diff --git a/client/src/App.tsx b/client/src/App.tsx index 4916836..3e3dcee 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -30,6 +30,7 @@ const validationSchema = Yup.object({ password: Yup.string() .trim() .min(8, "Password must be at least 8 characters") + .max(69, "Password must be at most 69 characters") .required("Password is required"), terms: Yup.boolean().oneOf( [true], diff --git a/server/models/User.js b/server/models/User.js index 8c9e79a..c9f2d58 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -24,7 +24,7 @@ module.exports = (sequelize, DataTypes) => { allowNull: false, }, password: { - type: DataTypes.STRING(255), + type: DataTypes.STRING(100), allowNull: false, }, }, diff --git a/server/routes/users.js b/server/routes/users.js index 853e233..894fc9f 100644 --- a/server/routes/users.js +++ b/server/routes/users.js @@ -17,7 +17,7 @@ let validationSchema = yup.object({ .matches(/^[0-9]+$/) .length(8) .required(), - password: yup.string().trim().max(255).required(), + password: yup.string().trim().max(100).required(), }); router.post("/", async (req, res) => {