I use ng-pattern to have validation on one of text inputs. Is there a way to trigger the validation only if the text input has been modified? Or in other words, the validation should not be triggered when text input is pristine, ie. not modified by the user (perhaps by setPristine(true). Not sure, but this could be done by setting the field as valid on init. Here's a part of my code (from *.jade file):
+text_input('Flat number', 'flatNumber', '', null, {
tooltip: '{{ "invalid_flat_number_tooltip" | translate }}'
})(ng-disabled='!editable', ng-readonly='!editable', ng-pattern="/^(?:\\d{1,3}[A-Z]?(?:\\/\\d{1,3})?)?$/", label-s)
ng-pattern supports dynamic value, so e.g. you can have this: