You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In both examples, if you check the "Show Array Elements" checkbox, the array section appears. If you provide at least a value for Field 1 and submit, the form validates for 0.8.13, but not for 0.8.14.
In 0.8.14, the form has the following $error:
"$error": {
"schemaForm": [
{
"$viewValue": [
{
"Field1": "My Test Value for Field1"
}
],
"$modelValue": [
{
"Field1": "My Test Value for Field1"
}
],
"$validators": {},
"$asyncValidators": {},
"$parsers": [
null
],
"$formatters": [
null
],
"$viewChangeListeners": [],
"$untouched": true,
"$touched": false,
"$pristine": false,
"$dirty": true,
"$valid": false,
"$invalid": true,
"$error": {
"schemaForm": true
},
"$name": "",
"$options": {}
}
]
}
@json-schema-form/angular-schema-form-lead
The text was updated successfully, but these errors were encountered:
@rthaut wow, that's an interesting case. No doubt plenty of users have it. Thanks for the demos, it does seem related to the condition as removing the condition it works in both, I suspect it was related to some fo the array changes that went into the branch mid last year.
Anthropic
changed the title
[0.8.14] Conditional Array Properties are Not Validated Correctly
version(0.8.14) regression in conditional array validation
Aug 14, 2018
@rthaut can you test again with the bootstrap decorator from 0.8.13 with ASF 0.8.14? I think it just included a version of the decorator too new for the code in ASF.
This appears to be a new bug introduced in version 0.8.14.
Basically, if you have an
array
property in your schema, and that property is conditional, the form is not being validated correctly.Here is a reduced example showing it working with version 0.8.13.
Here is the exact same example NOT working with version 0.8.14.
In both examples, if you check the "Show Array Elements" checkbox, the array section appears. If you provide at least a value for Field 1 and submit, the form validates for 0.8.13, but not for 0.8.14.
In 0.8.14, the form has the following
$error
:@json-schema-form/angular-schema-form-lead
The text was updated successfully, but these errors were encountered: