Thanks to visit codestin.com
Credit goes to github.com

Skip to content

size, lte, and gte rules are comparing numeric value instead of string length when applied to text fields #466

@MontherTwisi

Description

@MontherTwisi

Environment

https://builder.vueform.com/

Reproduction

https://codesandbox.io/p/devbox/async-dream-jv7fjn

use preview https://jv7fjn-5173.csb.app

Describe the bug

When using validation rules such as size, lte, and gte on a text field, the validation currently treats the input as a numeric value rather than validating against the character length of the string. This results in unexpected behavior — for example, setting size:3 on a text field causes it to fail unless the input is literally "3" or "003", instead of checking if the string is 3 characters long.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions