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
|
||||
1
app/validators/user.js.map
Normal file
1
app/validators/user.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../app/validators/user.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAA;AAK/B,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;AACxD,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;AAK/D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC1D,QAAQ,EAAE,QAAQ,EAAE;IACpB,oBAAoB,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;CACpD,CAAC,CAAA;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;IACxC,KAAK,EAAE,KAAK,EAAE;IACd,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;CACxB,CAAC,CAAA"}
|
||||
Reference in New Issue
Block a user