diff --git a/frontend/src/utils/validationSchemas.js b/frontend/src/utils/validationSchemas.js index 227841e5..a61d6653 100644 --- a/frontend/src/utils/validationSchemas.js +++ b/frontend/src/utils/validationSchemas.js @@ -48,4 +48,5 @@ export const snippetName = () => string() .required('errors.validation.requiredField') .max(SNIPPET_NAME_MAX_LENGTH, 'errors.validation.snippetNameMaxLength') - .matches(/^[a-zA-Z 0-9._-]*$/, 'errors.validation.singleWord'); + .matches(/^[a-zA-Z 0-9._-]*$/, 'errors.validation.singleWord') + .matches(/^(?!\s+$).+$/, 'errors.validation.requiredField');