Skip to content

Commit 7415e55

Browse files
committed
Update the example to match the tested basic rule
1 parent 51fd143 commit 7415e55

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ const { validate, email, length, required } = require('validate')
66
const rules = {
77
fields: {
88
email: {
9-
validator: (value) => {
9+
validator: value => {
1010
return length(value, { max: 75 }) && email(value)
1111
},
1212
message: 'The given email address is invalid',
1313
},
1414
password: {
15-
validator: (value) => {
16-
return length(value, { min: 18, max: 45 })
15+
validator: value => {
16+
return length(value, { min: 4, max: 18 })
1717
},
1818
},
1919
subscription: {
20-
validator: (value) => {
20+
validator: value => {
2121
return required(value)
22-
}
23-
}
24-
}
22+
},
23+
},
24+
},
2525
}
2626

2727
const { valid } = validate(fields, {

0 commit comments

Comments
 (0)