New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Apr 11, 2016

Conversation

Projects
None yet
2 participants
@pvdlg
Contributor

pvdlg commented Apr 10, 2016

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

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Apr 11, 2016

Member

Thank you! This was after all just an oversight.

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

Member

BalusC commented Apr 11, 2016

Thank you! This was after all just an oversight.

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

@pvdlg pvdlg deleted the pvdlg: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