We have some forms and we want to implement validation on field level. Means, as soon as i enter a value and move to next field, if the value entered is not as per desired regular expression than it should show the error. What i am trying is applying validator attribute on inputText and setting auto submit to true. It is working but some times page suddenly refresh itself and then the validation don't work.
Also one validation is to match the passwords (new password and confirm password). If i am using above method i am also not able to get the correct value of new password to match eith confirm password.
Can someone please suggest whats the right way to implement this functionality in ADF.
I am using jDev 184.108.40.206 and using Placeholder data control.
Does this help?
Thanks for the links.
I am able to apply the field level validation but the problem is using autosubmit=true cause a request to server. This is sometimes causing gap after tab out and a page refresh. So i just want to know if it is right to use autosubmit when there are many fields in the form to be validated as the user tab out or is there any other way? Is java script suggested for such cases?
Thanks for the reply.
I need some guidline on the best way to do our validation. We will be getting our data from WebService data control. No application module data controls at all. We need validation on the fileds on submitting the form. Can you please suggest whats the right way of doing this. Should i go with <af:validateRegExp> like tags or should i write code in manages bean and use the validator attribute to link. Our validation are simple like matching Regular Exp or comparing two fileds. We will need same validations to be used on different modules of proj as well.
Thanks for all your help.
For cross field validation, that's most easily done at the JSF bean level. It will require a round trip to the server to perform the validation though (rather than just validated at the client level). Is that an issue? There's an alternative solution but if you're not worried about round trips, go with the simple solution.