Skip to content

Field validation / character limitations. #56

@ValerioLyndon

Description

@ValerioLyndon

Has this feature been requested already?

  • I have searched the existing issues and this is a new request.

What is your desired feature/change?

A new JSON key for options that would add a custom Regex validation step. Could also add a character limit maybe?

Would provide a way to check the inputted string against a Regex, such as /[a-zA-Z0-9]/, to make sure that only certain characters (alphanumeric in this case) would be accepted. Should also have some method to check for matches such as /[0-9]+px/ and fail if it doesn't match. These two are essentially opposite examples so you would need to figure out a way to easily swap between "fail on match" and "fail on no matches" functionality.

Why should this be added?

Would be nice for certain fields such as usernames or edge case custom values where maybe you require a "px" or "%" value.

Additional notes

Key could be "validation", "validate", or otherwise, and could accept a Regex as a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions