You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <ma...@reumann.net> on 2002/09/05 21:32:50 UTC

concern over validation results

Sorry to repeat this question, possibly someone can help out...

Is there any way I could use the validation package to not only just
return errors where a required form field is missing but also on the
FIRST return also bring back validation of form fields that are
designated as 'not required' but do need validation if they are
entered?

For example picture a simple case where "firstName" and "lastName" are required fields and
"favoriteNumber" is not required but has integer validation. Now it
seems that if a user were to forget to enter a lastName and also
entered in an invalid number, the only thing returned at first would
be "FirstName is required." It wouldn't be until they submitted again,
after entering a firstName, that you would get the error returned
about an invalid number entered for favorite number. Is there any way
to have it also validate the favoriteNumber field (if one is entered)
at the same time it is looking at the required fields?

Thanks for any info.


-- 

Rick
mailto:maillist@reumann.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>