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
When saving entity fields, or blocks, or pages we need to save a list of properties in a JSON field in the DB.
We should validate the JSON schema before we save it to the DB.
for example:
EntityField.Properties is a JSON field that holds the special properties for each dataType.
When data type is "Single Line Text" the properties should only include "Max Length"
When data type is "Whole Number" the properties should include "Min Value" and "Max value".
In order to do that we can use a JSON schema validation package
When saving entity fields, or blocks, or pages we need to save a list of properties in a JSON field in the DB.
We should validate the JSON schema before we save it to the DB.
for example:
EntityField.Properties is a JSON field that holds the special properties for each dataType.
When data type is "Single Line Text" the properties should only include "Max Length"
When data type is "Whole Number" the properties should include "Min Value" and "Max value".
In order to do that we can use a JSON schema validation package
https://github.com/tdegrunt/jsonschema
https://github.com/ajv-validator/ajv
https://github.com/ebdrup/json-schema-benchmark
for each datatype we should have an hard-coded schema and use it both on the client side and server for validation and presentation.
The text was updated successfully, but these errors were encountered: