erkin dunya

erkin dunya

  • NA
  • 7
  • 0

On MVC form how can I add validate two fields on form

Jan 29 2016 1:07 PM
I have two fields one called Age range another called Actual Age,
The  Age range is configured as (nvarchar (70)) and got value such as
<1year
1-6year
7-12year
>18year 
 
so the Actual age of child is in (int) such as 1 or any whole number
when end user selected Age range 1-6year 
and type 0 or 7 or larger Actual Age should only allow them to input, that incorrect value should through a message or validation or help on this Actual Age value.
 
or  when end user selected Age range >18year
 and type anything less than 18 Actual Age should not accept, that incorrect value should through a message or validation or help on this Actual Age value.
 
or when end user selected Age range <1year
and type only less than 1 on Actual Age should only be allow them to input, if incorrect value should through a message or validation or help on this Actual  Actual Age value.
Please have a look at the image link below. 
 
 
Many thanks in advance 

Answers (4)