Skip to content

Commit

Permalink
udpate doc spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
shayneczyzewski committed Dec 6, 2021
1 parent 832faa8 commit 72c8794
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions web/docs/language/basic-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,21 @@ You don't need to worry about hashing the password yourself! Even when you are u
To disable default validations, or add your own, you can do:
```js
const newUser = context.entities.User.create({
data: { email: 'some@email.com', password: 'this will be hashed!' },
_waspSkipDefaultValidations: true, // defaults to false
_waspCustomValidations: [
{
validates: 'password',
message: 'password must be present',
validator: password => !!password
},
{
validates: 'password',
message: 'password must be at least 8 characters',
validator: password => password.length >= 8
},
]
})
data: { email: 'some@email.com', password: 'this will be hashed!' },
_waspSkipDefaultValidations: true, // defaults to false
_waspCustomValidations: [
{
validates: 'password',
message: 'password must be present',
validator: password => !!password
},
{
validates: 'password',
message: 'password must be at least 8 characters',
validator: password => password.length >= 8
},
]
})
```

:::info
Expand Down

0 comments on commit 72c8794

Please sign in to comment.