I have a field that has required validation property and also remote validation property.
I want to display the error message only if remote validation fails, and not on required property.
I can set the error message to an empty string, but i don't want to modify the ViewModel Data Annotations.
Is possible to do this only from client-side, without modifying the ViewModel properties?
// working hack
public class CreateViewModel
{
    [Required(ErrorMessage = " ")]
    [Remote("IsUserNameValid", "Users", ErrorMessage = "This user name is already used")]
    [Display(Name = "User Name")]
    public string UserName { get; set; }
}
 
     
    