Skip to content

How to handle null values? (invalid type: null (expected string)) #193

@ms88privat

Description

@ms88privat

Hello,

my specified form schema matches the properties of a model which is coming from a backend server.
A lot of the properties are not necessarily required and have therefore a 'null value'.

For example:
model = {name: null, id: 32}.
So my schema looks like this:
schema = {type: 'object', properties: {name: {type: 'string'}. id: {type: 'integer'}.

The problem is, that i can not validate the form because of null != string.

I really do not want to parse all of the models and properties beforehand....
I think it is related to #146 but there is no solution?

Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions