Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create tuple validator #8

Open
audse opened this issue Jun 24, 2023 · 0 comments
Open

Create tuple validator #8

audse opened this issue Jun 24, 2023 · 0 comments
Assignees
Labels
feature New large feature

Comments

@audse
Copy link
Collaborator

audse commented Jun 24, 2023

This should be similar to the array validator.

Basically, instead of having one element validator that validates every element in the array, you should be able to specify an arbitrary number of validators.

Example

assert(
    JTupleValidator.new().elements([
        JIntValidator.new(),
        JBoolValidator.new()
    ]).is_valid([1, true])
)
@audse audse added the feature New large feature label Jun 24, 2023
@audse audse self-assigned this Jun 24, 2023
@audse audse changed the title Create Tuple Validator Create tuple validator Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New large feature
Projects
None yet
Development

No branches or pull requests

1 participant