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
For boolean properties, I believe this keyword is being misinterpreted. It appears that angular-schema-form is interpreting "required" to mean "The user must check this box". Or, in other words "required" is being interpreted to mean "This property must have the value 'true'".
In the schema section, add "soul" to the "required" array.
Go to the "generated form" section, and uncheck the "Terms of Service" checkbox.
Click the "Do It" button
You will see "Form is not valid", and you will see that the "Terms of Service" widget gets a red "required" warning.
It seems as if angular-schema-form is imposing its own meaning onto the "required" keyword for boolean properties. This seemingly makes it impossible to define a schema that says "the object instance must contain this field, but it can be either true or false".
The text was updated successfully, but these errors were encountered:
The JSON Schema spec says this about the "required" keyword:
In other words, marking a property as "required" is supposed to mean "This property must not be omitted from the object instance".
See http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.17
For boolean properties, I believe this keyword is being misinterpreted. It appears that angular-schema-form is interpreting "required" to mean "The user must check this box". Or, in other words "required" is being interpreted to mean "This property must have the value 'true'".
This can be seen on the schemaform demo site: http://schemaform.io/examples/bootstrap-example.html
You will see "Form is not valid", and you will see that the "Terms of Service" widget gets a red "required" warning.
It seems as if angular-schema-form is imposing its own meaning onto the "required" keyword for boolean properties. This seemingly makes it impossible to define a schema that says "the object instance must contain this field, but it can be either true or false".
The text was updated successfully, but these errors were encountered: