AngularJS directive for custom validations based on expressions.
The wj-validation-error directive supports both AngularJS and native HTML5
validation mechanisms. It accepts an arbitrary AngularJS expression that should return
an error message string in case of the invalid input and an empty string if the input is valid.
For AngularJS validation it should be used together with the ng-model directive.
In this case the wj-validation-error directive reports an error using a call
to the NgModelController.$setValidity method with the wjValidationError error key ,
in the same way as it happens with AngularJS native and custom validation directives.
For HTML5 validation, the wj-validation-error directive sets the error state to the
element using the setCustomValidity method from the HTML5 validation API. For example:
AngularJS directive for custom validations based on expressions.
The wj-validation-error directive supports both AngularJS and native HTML5 validation mechanisms. It accepts an arbitrary AngularJS expression that should return an error message string in case of the invalid input and an empty string if the input is valid.
For AngularJS validation it should be used together with the ng-model directive. In this case the wj-validation-error directive reports an error using a call to the NgModelController.$setValidity method with the wjValidationError error key , in the same way as it happens with AngularJS native and custom validation directives.
For HTML5 validation, the wj-validation-error directive sets the error state to the element using the setCustomValidity method from the HTML5 validation API. For example: