Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit 17f7216

Browse files
committed
Added validation-message
1 parent 10b6b28 commit 17f7216

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/validation-common.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ angular
255255
}
256256
if(!isValid) {
257257
isFieldValid = false;
258+
259+
// validationMessage is passed as argument and our field is invalid, we will display only that validationMessage
260+
// this will overwrite all other validator messages
261+
if(!!self.validatorAttrs && self.validatorAttrs.hasOwnProperty('validationMessage')) {
262+
message = self.validatorAttrs.validationMessage;
263+
continue;
264+
}
258265
message += $translate.instant(self.validators[j].message);
259266

260267
// replace any error message param(s) that were possibly passed

0 commit comments

Comments
 (0)