Basic backend support to at least store a backup model in the DB

This commit is contained in:
Dane Everitt 2020-04-04 12:26:39 -07:00
parent 6d426e45d9
commit d27f0c6f2a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 138 additions and 18 deletions

View file

@ -96,7 +96,9 @@ export default ({ onBackupGenerated }: Props) => {
onSubmit={submit}
initialValues={{ name: '', ignored: '' }}
validationSchema={object().shape({
name: string().max(255),
name: string().required()
.matches(/^[w\][\w\s_.-]*[\w]$/, 'Backup name must only contain alpha-numeric characters, spaces, underscores, dashes, and periods. The name must start and end with an alpha-numeric character.')
.max(255),
ignored: string(),
})}
>