To add unobtrusive validation to an element, you add the following HTML attributes:
data-val = true
data-val-(required|regex|range|equalto|remote|length|number)="your error message"
and, depending on the validation message set the values of corresponding data-val- attribute listed below:
Make sure that you have included the script references to
and you are good to go….