Saturday 6 March 2021

MVC - Remote Validation - Passing multiple additional fiels for validation

 Watch this example on YouTube


 

Replace

   [Remote(action: "ValidateSalary", controller: "Home",  ErrorMessage ="will never be displayed - it will display message returned by stored procedure")]
        public int Salary { get; set; }

with

  [Remote(action: "ValidateSalary", controller: "Home", AdditionalFields = "FirstName,LastName",  ErrorMessage ="will never be displayed - it will display message returned by stored procedure")]
        public int Salary { get; set; }

No comments:

Post a Comment