Refined data entry sizes
This commit is contained in:
@@ -30,6 +30,7 @@ const validationSchema = Yup.object({
|
|||||||
password: Yup.string()
|
password: Yup.string()
|
||||||
.trim()
|
.trim()
|
||||||
.min(8, "Password must be at least 8 characters")
|
.min(8, "Password must be at least 8 characters")
|
||||||
|
.max(69, "Password must be at most 69 characters")
|
||||||
.required("Password is required"),
|
.required("Password is required"),
|
||||||
terms: Yup.boolean().oneOf(
|
terms: Yup.boolean().oneOf(
|
||||||
[true],
|
[true],
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
type: DataTypes.STRING(255),
|
type: DataTypes.STRING(100),
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ let validationSchema = yup.object({
|
|||||||
.matches(/^[0-9]+$/)
|
.matches(/^[0-9]+$/)
|
||||||
.length(8)
|
.length(8)
|
||||||
.required(),
|
.required(),
|
||||||
password: yup.string().trim().max(255).required(),
|
password: yup.string().trim().max(100).required(),
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post("/", async (req, res) => {
|
router.post("/", async (req, res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user