AubreyHewes / redux-form-byschema

Generate a redux-form from a json schema
MIT License
1 stars 0 forks source link

required field should enforce minLength=1 when applicable #8

Open AubreyHewes opened 5 years ago

AubreyHewes commented 5 years ago

Using redux form touching the field the field is set as an empty value.. as such is fulfilling required.

To force a proper validation the generator should also mutate the schema to enforce a minLength of 1

Reggino commented 4 years ago

maxLength should also be honored

AubreyHewes commented 4 years ago

@Reggino it already is https://github.com/AubreyHewes/redux-form-byschema/blob/5c01fd45fa7def305b2630819eb6d17c945028f3/src/SchemaForm/renderer.js#L480 ;-)