Skip to content

Inconsistent behaviour regarding empty strings #573

Open
@vicary

Description

@vicary

We have two different behaviours when dealing with "type": "string" properties,

  1. When the field is invalid by any rules, it removes the property.
  2. When the field is valid, an empty textbox creates an empty string.

This breaks the meaning of valid when dealing with this case,

  1. The property is not required
  2. The property has a minLength
  3. The model has that property with a valid value inside

ASF reports a valid input at the textbox, while still creating an empty string in the property which is in fact invalid.

Point 3. is not the only way to produce this, see this gist for a working demo, enter text and then delete it you'll get an empty string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions