In that case, the previous value of the field is restored, and the user has to enter the data again.
This is not always desired (for more complicated data, it will probably be much easier to take a look, correct that one typo and continue with the rest of the form), so my preference is actually to mark the field so that the user knows which field needs to be corrected, and have the validation script not report a validation error back to the field: Using this method has implications on the form submission process: The form no longer can verify that the data is correct, so the submission function needs to do another round of validation to see if any of the required fields are not correct (one way to do that is to test all relevant fields to see if the text color is using the error color, or we can use global variables to store the validation state).
To implement it, we need to define separate The Mobile numbers can accept only 12 digits (includes country code).
Since we need to disable the Submit button when all validations are satisfied, we can achieve it using ng-disabled Angular directive as shown here: This directive accepts Boolean value, the value will be true only if the form is validated.
Once the form has all valid entries, the Submit button will be enabled.