O'Reilly logo

ZK Developer's Guide by Markus Stauble, Hans-Jurgen Schumacher, Jurgen Schumacher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a Login Page

Now it's time to add a login page to our application. The screen itself is very simple, and appears like the following figure:

The two fields Username and Password should have validation. The validation is enabled with the help of the constraint attribute. This attribute can contain a combination of the following options:

  • no positive

  • no negative

  • no zero

  • no empty

  • no future

  • no past

  • no today

  • a regular expression

In our example, we use no empty.

How to validate a form

In the earlier chapters, we used WrongValueException to validate a single input field. However, when we click on the button and submit the data of form, validation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required