Skip to content

Commit 094e96c

Browse files
committed
add global form option to disable tv4 validation
1 parent 6d0e3a6 commit 094e96c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/directives/schema-validate.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ angular.module('schemaForm').directive('schemaValidate', ['sfValidator', 'sfSele
4141
return viewValue;
4242
}
4343

44+
// Omit TV4 validation
45+
if (scope.options && scope.options.tv4Validation === false) {
46+
return viewValue;
47+
}
48+
4449
var result = sfValidator.validate(form, viewValue);
4550
// Since we might have different tv4 errors we must clear all
4651
// errors that start with tv4-

0 commit comments

Comments
 (0)