While you can add the data-val attributes for MVC client side validation by default MVC unobtrusive validation won’t process them.
What you have to do is remove the validators and re-add them.
1 | $(“#Password”).attr(“data-val-required”, “Password is required”); |