[RequiredIf("Typeofproperty", "Typeofproperty != 5 && Typeofproperty != 2", ErrorMessage = "Do you need Two-wheeler parking ?")]
public int Twowheelerparking { get; set; }
Here Typeofproperty is of type int and control used for it is a radio button. 5 and 2 are the values of radio buttons for Plot and House. I want to validate Twowheelerparking if it is not a plot and house. The code above is not working for this purpose. Please tell me how to do it.