cerebral-forms
Advanced tools
Comparing version 1.0.0-b-alpha.0a224137 to 1.0.0-b-alpha.0e4c147a
@@ -17,3 +17,3 @@ 'use strict'; | ||
path = _ref.path, | ||
resolveArg = _ref.resolveArg; | ||
resolve = _ref.resolve; | ||
@@ -31,7 +31,7 @@ if (typeof formPath === 'string') { | ||
} else { | ||
if (!resolveArg.isTag(formPath, 'state')) { | ||
if (!resolve.isTag(formPath, 'state')) { | ||
throw new Error('Cerebral Forms - isValidForm factory requires a STATE TAG'); | ||
} | ||
var _form = resolveArg.value(formPath); | ||
var _form = resolve.value(formPath); | ||
@@ -38,0 +38,0 @@ if ((0, _isValidForm2.default)(_form)) { |
@@ -45,3 +45,3 @@ 'use strict'; | ||
var state = _ref.state, | ||
resolveArg = _ref.resolveArg; | ||
resolve = _ref.resolve; | ||
@@ -55,9 +55,9 @@ if (typeof formPath === 'string') { | ||
} else { | ||
if (!resolveArg.isTag(formPath, 'state')) { | ||
if (!resolve.isTag(formPath, 'state')) { | ||
throw new Error('Cerebral Forms - isValidForm factory requires a STATE TAG'); | ||
} | ||
var _form = resolveArg.value(formPath); | ||
var _form = resolve.value(formPath); | ||
state.merge(resolveArg.path(formPath), resetObject(_form)); | ||
state.merge(resolve.path(formPath), resetObject(_form)); | ||
} | ||
@@ -64,0 +64,0 @@ } |
@@ -17,3 +17,3 @@ 'use strict'; | ||
var state = _ref.state, | ||
resolveArg = _ref.resolveArg; | ||
resolve = _ref.resolve; | ||
@@ -26,7 +26,7 @@ var path = void 0; | ||
} else { | ||
if (!resolveArg.isTag(fieldPath, 'state')) { | ||
if (!resolve.isTag(fieldPath, 'state')) { | ||
throw new Error('Cerebral Forms - validateField factory requires a STATE TAG'); | ||
} | ||
path = resolveArg.path(fieldPath); | ||
path = resolve.path(fieldPath); | ||
} | ||
@@ -37,3 +37,3 @@ | ||
var field = state.get(path); | ||
var form = state.get(formPath); | ||
var form = state.get(formPath.join('.')); | ||
var validationResult = (0, _runValidation2.default)(field, form); | ||
@@ -40,0 +40,0 @@ |
@@ -18,3 +18,3 @@ 'use strict'; | ||
input = _ref.input, | ||
resolveArg = _ref.resolveArg; | ||
resolve = _ref.resolve; | ||
@@ -44,7 +44,7 @@ function validate(path, form) { | ||
} else { | ||
if (!resolveArg.isTag(formPath, 'state')) { | ||
if (!resolve.isTag(formPath, 'state')) { | ||
throw new Error('Cerebral Forms - validateField factory requires a STATE TAG'); | ||
} | ||
validate(resolveArg.path(formPath).split('.'), resolveArg.value(formPath)); | ||
validate(resolve.path(formPath).split('.'), resolve.value(formPath)); | ||
} | ||
@@ -51,0 +51,0 @@ } |
{ | ||
"name": "cerebral-forms", | ||
"version": "1.0.0-b-alpha.0a224137", | ||
"version": "1.0.0-b-alpha.0e4c147a", | ||
"description": "Signals, actions and state factories to create forms", | ||
@@ -28,7 +28,7 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"cerebral": "^2.0.0-b-alpha.0a224137" | ||
"cerebral": "2.0.0-b-alpha.0e4c147a" | ||
}, | ||
"devDependencies": { | ||
"@cerebral/monorepo": "^0.0.1-alpha.0a224137", | ||
"cerebral": "^2.0.0-b-alpha.0a224137" | ||
"@cerebral/monorepo": "0.0.1-alpha.0e4c147a", | ||
"cerebral": "2.0.0-b-alpha.0e4c147a" | ||
}, | ||
@@ -35,0 +35,0 @@ "nyc": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193
72276