2 Replies Latest reply on Jan 12, 2008 8:37 PM by Chris Malan

    How to validate only if the user entered a string

    Chris Malan Novice

      In the User entity bean an e-mail address is validated using @Email. It works fine, but the user should also be allowed not to enter anything in this field.

      The field is not annotated with @NotNull and the default in the database is null for this field. However, Seam wants a value there. The form does not require a value to be entered.

      How do I tell Seam to make sure any value is a valid email address if something is entered, but to allow null through?