Implementing angular ng-messages for validation message display
Check out this code snippet:
<ul ng-messages="formToValidate.fieldToValidate.$error" ng-messages-multiple>
<li ng-message="pattern">Invalid pattern</li>
<li ng-message="minlength, maxlength">Input should be 7 to 100 characters long</li>
<li ng-message="!pattern && !minlength && !maxlength && onlyAfterAllOtherPassedValidation">
Displayed when all previous validations pass and onlyAfterAllPassedValidation fails
</li>
</ul>
I'm seeking a way to show the last validation message only if all other checks have passed but "onlyAfterAllPassedValidation" fails. I am unsure how to pass a complex condition to ng-message. Any tips or alternative solutions are appreciated as long as ng-messages can still be used.