0

I have a form with many fields i.e single and joint applications. Based on the radio button I need to validate these fields .

If I choose yes in radio button then single and joint fields has to be vaidated and if I choose no then single alone needs to be validated.

I need to use field level validations .How to validate fields based on radio button?
I have gone through couple of links

Eg: JSR 303 Validation, If one field equals "something", then these other fields should not be null

Above link doesn't have any annotations at field level. Any body who can shed some thoughts would b appreciated.

Pradeep
  • 1,947
  • 3
  • 22
  • 45

1 Answers1

2

You can have custom class level validation. Check out this link

Bhushan
  • 1,489
  • 3
  • 27
  • 45
  • hi Bhushan this I already know .. how you will propogate field level error messages at class level ? – Pradeep Sep 17 '19 at 19:29