Skip to content

Umbraoco Forms API number validation fails even when numerical value is provided #1391

Open
@tommhuth

Description

@tommhuth

Which Umbraco version are you using?

version 13.5.3

Bug summary

Number validation fails even when numerical value is provided

Specifics

Forms API

Steps to reproduce

When submiting a form with the following (only) value

{"values": { "telefonnummer": 234234 } }

with telefonnummer set to field type number and required, the API POST gives a 422 error:

{
    "errors": {
        "telefonnummer": [
            "Venligst indtast en v\u00E6rdi for Telefonnummer"
        ]
    },
    "status": 422,
    "title": "One or more validation errors occurred."
}

If I change it to something else like text, the request goes through.

Expected result / actual result

Endpoint should not fail with valid data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions