init
This commit is contained in:
14
app/validators/user.js
Normal file
14
app/validators/user.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import vine from '@vinejs/vine';
|
||||
const email = () => vine.string().email().maxLength(254);
|
||||
const password = () => vine.string().minLength(8).maxLength(32);
|
||||
export const signupValidator = vine.create({
|
||||
fullName: vine.string().nullable(),
|
||||
email: email().unique({ table: 'users', column: 'email' }),
|
||||
password: password(),
|
||||
passwordConfirmation: password().sameAs('password'),
|
||||
});
|
||||
export const loginValidator = vine.create({
|
||||
email: email(),
|
||||
password: vine.string(),
|
||||
});
|
||||
//# sourceMappingURL=user.js.map
|
||||
Reference in New Issue
Block a user