Reputation: 11
I am working on an user registration form. I want to make certain fields mandatory. What JSF tags can I use to make the fields mandatory?
Upvotes: 0
Views: 4308
Reputation: 119
You can use <p:inputText required="true"
, its easy and fast.
OR Use Bean Validation.
Bean Validation is a standard validation specification that allows us to easily validate domain objects by using a set of constraints declared in the form of annotations.
New built-in constraints: @Email, @NotEmpty, @NotBlank, @Positive, @PositiveOrZero, @Negative, @NegativeOrZero, @PastOrPresent and @FutureOrPresent
Upvotes: 0