Skip to content

Commit

Permalink
Update the README.md example to highlight the minDomainAtoms option f…
Browse files Browse the repository at this point in the history
…or the email validation method.
  • Loading branch information
heylookalive committed Jul 30, 2018
1 parent bcc5f12 commit cf71883
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -28,7 +28,7 @@ const schema = Joi.object().keys({
password: Joi.string().regex(/^[a-zA-Z0-9]{3,30}$/),
access_token: [Joi.string(), Joi.number()],
birthyear: Joi.number().integer().min(1900).max(2013),
email: Joi.string().email()
email: Joi.string().email({ minDomainAtoms: 2 })
}).with('username', 'birthyear').without('password', 'access_token');

// Return result.
Expand Down Expand Up @@ -56,6 +56,7 @@ The above schema defines the following constraints:
* an integer between 1900 and 2013
* `email`
* a valid email address string
* must have two domain parts e.g. `example.com`

# Usage

Expand Down

0 comments on commit cf71883

Please sign in to comment.