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

Inclusion validator #1

Open
asaf opened this issue Aug 6, 2013 · 0 comments
Open

Inclusion validator #1

asaf opened this issue Aug 6, 2013 · 0 comments
Assignees
Milestone

Comments

@asaf
Copy link
Owner

asaf commented Aug 6, 2013

Inclusion validator

Define a list of allowed values.

Validator options:

message: Override default validator message.
allowBlank: if true validation will be skipped for empty value.
range: An array of two elements where 1st element as the lower bound & 2nd element as the upper bound of the range.
in: An array of allowed values.

Note: range / in cannot be mixed together.

Examples:

inclusion: { 
  range: [18, 150], 
  allowBlank: true, 
  message: 'Age must be between 18-150 or empty' 
}
inclusion: { in: ['Private', 'Public'] }
@ghost ghost assigned asaf Aug 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant