1. I have a textbox called amt which has a validation to accept only numbers with one decimal point.
2. I use
struts tags for the textbox and javascript to perform the validation
3. Struts code:
4. Javascript code:
5. The above validation works for numbers but I have to put a validation for only one decimal point.
6. I want to use the folowing approach:
Use a regular expression like
But how do I call the bean property in javascript and match the value with the regular expression.
For HTML textbox,I can use
but how does it work in struts.
7. Is there any other approach.
Please help me resolve this.