Fail validation if @Param required attribute is not satisfied #236

merged 1 commit into from Apr 11, 2016


None yet

2 participants


Current if the a request parameter is injected with @Param(required = true) and the parameter is null or empty, a validation message is added but the validation is not considered failed.
Therefore Faces.isValidationFailed() will return false.

The Bean validation works though. So adding @NotNull on the attribute will work as expected.

Anyway it might still be desirable to fail the validation in the case with @Param(required = true) and no Bean validation defined.

@BalusC BalusC merged commit 1b6a22f into omnifaces:master Apr 11, 2016
BalusC commented Apr 11, 2016

Thank you! This was after all just an oversight.

It's available in today's latest 2.4-SNAPSHOT.

@vanduynslagerp vanduynslagerp deleted the vanduynslagerp:param-required-validation branch Dec 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment