fix: switch PGP regex to span multiple lines (#1598)

* fix: switch PGP regex to span multiple lines

* also change the regex in this file
pull/1617/head
Jabster28 3 years ago committed by GitHub
parent 361ea77588
commit d0703aa377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -108,7 +108,7 @@ const NotificationsEmail: React.FC = () => {
otherwise: Yup.string().nullable(),
})
.matches(
/^-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----$/,
/-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/s,
intl.formatMessage(messages.validationPgpPrivateKey)
),
pgpPassword: Yup.string().when('pgpPrivateKey', {

@ -38,7 +38,7 @@ const UserEmailSettings: React.FC = () => {
pgpKey: Yup.string()
.nullable()
.matches(
/^-----BEGIN PGP PUBLIC KEY BLOCK-----.+-----END PGP PUBLIC KEY BLOCK-----$/,
/-----BEGIN PGP PUBLIC KEY BLOCK-----.+-----END PGP PUBLIC KEY BLOCK-----/s,
intl.formatMessage(messages.validationPgpPublicKey)
),
});

Loading…
Cancel
Save