Skip to content

Preloaded Disabled Number field validation error #6269

@MoeHamdan

Description

@MoeHamdan

Describe the bug
When loading a form that has preloaded data into disabled number field, and that field is marked as required. The validation will still show the field is required to be filled, though it has a value. Looking at form instance data I noticed that because the value is string (i.e "123" and not 123) the validation is not working correctly.

Version/Branch
@formio/js 5.2.3

To Reproduce
Steps to reproduce the behavior:

  1. Create form...
  2. Add number component...
  3. Mark the component as required and disabled
  4. Set API attributes so it pre-loads the data from API for instance
  5. Open the form it should load the data into the number component
  6. Try submit the validation will kick in and shows validation error thus preventing submission

Expected behavior
Since the number component is already loaded it should just work just fine.

Screenshots

Image

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