1. I have a textbox called amt which has a validation to accept only numbers with one decimal point.
3. Struts 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
For HTML textbox,I can use but how does it work in struts.
7. Is there any other approach.
Once after reaching Client, it is no more struts and its just HTML. Since you need onfly validation, you can try using getting the element by name. It should be available in the document. Additionally, you can include the same in reg exp in validation.xml for form submission.
Have Fun with Java
little,little.. little by little makes a lot..