diff --git a/backend/src/middleware/validators.js b/backend/src/middleware/validators.js index bc951aa..220a510 100644 --- a/backend/src/middleware/validators.js +++ b/backend/src/middleware/validators.js @@ -60,14 +60,14 @@ const registerValidation = [ .trim() .isLength({ max: 100 }) .withMessage('First name must be less than 100 characters') - .matches(/^[a-zA-ZÀ-ÿ\s'-]+$/) + .matches(/^[a-zA-ZÀ-ÿąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s'-]+$/) .withMessage('First name contains invalid characters'), body('lastName') .optional() .trim() .isLength({ max: 100 }) .withMessage('Last name must be less than 100 characters') - .matches(/^[a-zA-ZÀ-ÿ\s'-]+$/) + .matches(/^[a-zA-ZÀ-ÿąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s'-]+$/) .withMessage('Last name contains invalid characters'), body('wsdcId') .optional({ nullable: true, checkFalsy: true })