MVC 5 Remote Validation
I need to validate an input field value from user before the form is submitted. I have created an action in my custom controller and decorated the field with it: action name: CheckValue controller name: Validate [Remote("CheckValue", "Validate"), ErrorMessage="Value is not valid"] public string Value { get; set; } The problem is when I press submit, the form is being submitted and then the message Value is not valid is shown if the value entered by the user is not valid. How can I validate the value entered by user and prevent the form to be submitted if value is not valid, and display the