Skip to content

Commit f6aa617

Browse files
committed
FIxes validateOnRender: true regression
validateOnRender: true was not always firing
1 parent 957ffa5 commit f6aa617

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

dist/angular-schema-form.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-schema-form
33
* @version 1.0.0-alpha.5
4-
* @date Sun, 25 Jun 2017 11:12:48 GMT
4+
* @date Mon, 17 Jul 2017 14:13:21 GMT
55
* @link https://github.com/json-schema-form/angular-schema-form
66
* @license MIT
77
* Copyright (c) 2014-2017 JSON Schema Form
@@ -87,7 +87,7 @@ module.exports = angular;
8787
/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!
8888
* json-schema-form-core
8989
* @version 1.0.0-alpha.5
90-
* @date Sun, 25 Jun 2017 10:52:17 GMT
90+
* @date Sat, 24 Jun 2017 14:16:26 GMT
9191
* @link https://github.com/json-schema-form/json-schema-form-core
9292
* @license MIT
9393
* Copyright (c) 2014-2017 JSON Schema Form
@@ -2912,7 +2912,7 @@ __WEBPACK_IMPORTED_MODULE_1_angular___default.a.module('schemaForm', deps)
29122912
ngModel.$setValidity(k, true);
29132913
});
29142914

2915-
if (!result.valid && (!ngModel.$pristine || triggered)) {
2915+
if (!result.valid && (!ngModel.$pristine || triggered || scope.options.validateOnRender === true)) {
29162916
// it is invalid, return undefined (no model update)
29172917
ngModel.$setValidity('tv4-' + result.error.code, false);
29182918
error = result.error;
@@ -3634,7 +3634,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
36343634
var destroyStrategy = form.destroyStrategy || scope.options && scope.options.destroyStrategy || 'remove';
36353635
// No key no model, and we might have strategy 'retain'
36363636
if (key && destroyStrategy !== 'retain') {
3637-
36383637
// Type can also be a list in JSON Schema
36393638
var type = form.schema && form.schema.type || '';
36403639

0 commit comments

Comments
 (0)