Skip to main content

Validate State

Recompile HomePage.cls and open it in a Web browser. Now, if we attempt to submit the form with anything other than a pair of characters from A-Z in the State field, Zen does the following:

  1. Prevents the form from submitting.

  2. Highlights the State field on the form.

  3. Displays an Alert box. As part of its message, the box displays the value of the <text> element's invalidMessage attribute.

Here is how this appears in a browser:

generated description: statevalidation 20131

FeedbackOpens in a new tab