I am developing an application where I have a form with a model "StudentListModel".
I have a button in the same page which is not a submit button. I have written an ajax function which calls an action method in the controller specified.
Now my problem is there is a textbox for the studentname ,
    [StringLength(160, MinimumLength = 3)]
    [Display(Name = "First Name")]
    [Required]
    [Remote("CheckDuplicateNames", "AddStudent")]
    public string StudentName { get; set; } 
None of these validations are firing.However if I make the button as submit ,these will work.
Is there any way to do model validation other than using formsubmission?
 
     
    