-
Notifications
You must be signed in to change notification settings - Fork 641
Closed
Description
I have created a custom form type, which adds a directive to the input. In the directive's link, I am adding a custom $validator to ngModel:
ngModel.$validators.foo = function(modelValue, viewValue){
var value = modelValue || viewValue;
return (value == 'bar');
};
(actual validator is more complex, so a simple tv4 pattern is not enough)
How can I set a custom message for this validation? I would have thought {validationMessage: {foo: "Foo is not bar!"}} would have done it... but the error message renders as [object Object]
Metadata
Metadata
Assignees
Labels
No labels