Skip to content

Commit

Permalink
Merge pull request #29 from joturako/patch-1
Browse files Browse the repository at this point in the history
Fix wrong example for name field
  • Loading branch information
marshallswain authored Dec 21, 2020
2 parents 8f874d8 + 46d6964 commit a350c78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Joi = require('joi');
const validate = require('@feathers-plus/validate-joi');

const name = Joi.string().trim().min(5).max(30)
.regex(/^[\sa-zA-Z0-9]$/, 'letters, numbers and spaces').required();
.regex(/^[\sa-zA-Z0-9]*$/, 'letters, numbers and spaces').required();
const password = Joi.string().trim().min(2).max(30).required();
const schema = Joi.object().keys({
name: name,
Expand Down Expand Up @@ -216,4 +216,4 @@ These are suitable methods to internationalize the majority of Joi error message

## License

MIT. See LICENSE.
MIT. See LICENSE.

0 comments on commit a350c78

Please sign in to comment.