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
As a developer, I expect to be able to define a schema for an array of non-empty strings, for which form validation rejects an array containing one or more empty strings.
... in the generated form, leave one or more of the entries empty. I expect the form to be rendered as invalid.
Actual behaviour
Using the schema above accepts an array containing empty strings or null entries and renders the form as valid. Trying to use pattern instead of minLength (e.g. "pattern": "^.+$") has the same result. TV4 itself rejects the model.
I tried setting minLength of 2 instead of 1, and this rejects arrays containing single-character strings, but still accepts arrays with empty strings & null entries.
As a developer, I expect to be able to define a schema for an array of non-empty strings, for which form validation rejects an array containing one or more empty strings.
Expected behaviour
Using the following schema:
and the following form config:
... in the generated form, leave one or more of the entries empty. I expect the form to be rendered as invalid.
Actual behaviour
Using the schema above accepts an array containing empty strings or null entries and renders the form as valid. Trying to use
pattern
instead ofminLength
(e.g."pattern": "^.+$"
) has the same result. TV4 itself rejects the model.I tried setting
minLength
of 2 instead of 1, and this rejects arrays containing single-character strings, but still accepts arrays with empty strings & null entries.Gist/Plunker/Demo
Demo plunker
Empty string issue:
Null entry issue:
null
entry.@json-schema-form/angular-schema-form-lead
The text was updated successfully, but these errors were encountered: