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
The sanitize method should take a schema and an input json. It should then output a version of the input that corresponds to the schema or throw an error if not possible.
For example it should:
Remove fields that are present but not defined in the schema
Keep fields that are correct according to the schema
Remove fields that don't match the schema but are optional
Throw an error if a required field is missing
Optionally it would also be good to have a strict mode so that in case 2) an error would be thrown as well.
The text was updated successfully, but these errors were encountered:
The sanitize method should take a schema and an input json. It should then output a version of the input that corresponds to the schema or throw an error if not possible.
For example it should:
Optionally it would also be good to have a strict mode so that in case 2) an error would be thrown as well.
The text was updated successfully, but these errors were encountered: