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

New types validation #14

Open
luiseduardobrito opened this issue Oct 2, 2013 · 0 comments
Open

New types validation #14

luiseduardobrito opened this issue Oct 2, 2013 · 0 comments

Comments

@luiseduardobrito
Copy link
Owner

Validations
Validations are defined on you attributes when defining a model. It uses Anchor behind the scenes to run validations whenever you create or update a record.
attributes: {
name: {
type: 'string',
maxLength: 20,
minLength: 5
},

email: {
type: 'email',
required: true
}
}

Available validations are:
empty
required
notEmpty
undefined
string
alpha
numeric
alphanumeric
email
url
urlish
ip
ipv4
ipv6
creditcard
uuid
uuidv3
uuidv4
int
integer
number
finite
decimal
float
falsey
truthy
null
notNull
boolean
array
date
hexadecimal
hexColor
lowercase
uppercase
after
before
is
regex
not
notRegex
equals
contains
notContains
len
in
notIn
max
min
minLength
maxLength

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant