I am stuck with certain scenarios in a validation. I need to valiadte a field - "First Name". Validations logic i have been using is -
- If the field is dirty then validate against regex
ng-show="aspnetForm.FirstName.$dirty && aspnetForm.FirstName.$error.nameValidate"
- If the field is marked required (currently keeping the field required is entirely business dependent so i am reading the true/false value from a JSON) then user may try submitting the form as it is - ng-show="blankSubmit && aspnetForm.FirstName.$error.required"
where blankSubmit is just a scope variable i am setting true on submit button click.
- Now 3rd scenario is the logic i am not getting that is if the user clicks on the firstname text box and then without dirtying it, just blurs out, then the validation message should be displayed if ng-required is set true.If i just place - ng-show="aspnetForm.FirstName.$error.required"then on the page load itself the error message is displayed which i dont want as it gives user a bad UX.- I solely want error message to be displayed when the attribute ng-required is set true and user blurs out of the textbox. 



