BestPractices
BestPractices

Reputation: 12876

How to validate two fields in JSF 2.0 without Bean Validaiton

I want to validate that two fields on a page match (e.g. are the same exact email address). I don't have access to bean validation/validation groups. How should I go about validating that both addresses match?

Current thought is to put a validator on the second field and have it check that it matches the submitted value of the first. Is this the best way or is there a way to do this via configuration or some other means?

Upvotes: 1

Views: 6875

Answers (1)

BestPractices
BestPractices

Reputation: 12876

Here are an aggregate of all solutions so far:

See

1) JSF doesn't support cross-field validation, is there a workaround?

Ajaxified solution: 2) How validate two password fields by ajax?

PostValidate solution: 3) How do i validate two component's value are same or not? JSF

Upvotes: 3

Related Questions