Skip to content

Commit

Permalink
feat: Add validation to prevent spaces in App name input
Browse files Browse the repository at this point in the history
  • Loading branch information
matejondov committed Oct 15, 2024
1 parent 2bb3659 commit cd2402d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ const LaunchNewAppForm = ({ closeModal }) => {
};

let validationSchema = Yup.object({
name: Yup.string().required('Required'),
name: Yup.string()
.required('Required')
.test('no-spaces',
'App name cannot contain spaces',
value => !/\s/.test(value)),
description: Yup.string().required('Required'),
});

Expand Down

0 comments on commit cd2402d

Please sign in to comment.