Skip to content

Exact length #672

Open
Open
@trusteddigital

Description

@trusteddigital

I may be missing something here but I've dug deep and can't find what I'm after. I want to validate on an exact length of string.

It's for a number which must be 11 digits long. So I'm using

<input type="text" data-validation="length" data-validation-length="11">

However whenever the input is not 11 digits, I'm getting the error

"The input value must be between 11 characters"

Rather than "must be 11 characters"

I understand that it's interpreting this as a range. The Readme itself states

"length — min/max/range"

Is there another function for doing exact lengths. Is it edge-case? Seems like a fairly reasonable thing to be able to want to do.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions