brutusin / json-forms

JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided
http://brutusin.org/json-forms
Apache License 2.0
606 stars 168 forks source link

Validation failure of enum value #135

Open pcpiela opened 5 years ago

pcpiela commented 5 years ago

After calling the render method with the following schema and initial data, calling the validate method returns an incorrect result of true.

schema: { "type": "object", "properties": { "id": { "type": "string", "enum": ["good"] } } }

Data to be validated:

{ "id": "bad" }

peeyush12345 commented 1 year ago

{ "type": "object", "properties": { "id": { "type": "string", "enum": ["good", "bad"] } } }