koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

minLength for string not applied to empty value #248

Open MOHACGCG opened 3 years ago

MOHACGCG commented 3 years ago

Hi

MinLength is not checked for string properties with empty string. In the schema bellow if the field is empty its considered valid (unexpected) but if there is 1 character its considered invalid (expected)

{
    type: 'object',
    properties: {
        limitedString: {
            type: 'string',
            title: 'I\'m a string with min/max length',
               minLength:2
        }
    }
}

Thanks