Skip to content

Conversation

@andersonjoseph
Copy link
Contributor

This PR add the following checkers:

  • alpha (Return true if the value is a string with only alphabetic characters)
const schema = {
  x: {type: 'string', alpha: true}
}
  • numeric (Return true if the value is a string with only numeric characters)
const schema = {
  x: {type: 'string', numeric: true}
}
  • alphanum (Return true if the value is a string with only alphanumeric characters)
const schema = {
  x: {type: 'string', alphanum: true}
}
  • alphadash (Return true if the value is a string with alphabetic characters and dashes)
const schema = {
  x: {type: 'string', alphadash: true}
}

@andersonjoseph andersonjoseph changed the title Add charset checket to string rules Add charset checker to string rules Nov 9, 2018
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c527462 on andersonjoseph:master into f20da30 on icebob:master.

Copy link
Owner

@icebob icebob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect PR! Thank you.

@icebob icebob merged commit af63854 into icebob:master Nov 9, 2018
@icebob icebob mentioned this pull request Nov 9, 2018
icebob added a commit that referenced this pull request Nov 11, 2018
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

Successfully merging this pull request may close these issues.

3 participants