Skip to content
Snippets Groups Projects
Commit eecba307 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

fix(authors): fix email regex on edit

parent 119d9a91
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,9 @@ import { Spinner } from '../UIComponents' ...@@ -11,7 +11,9 @@ import { Spinner } from '../UIComponents'
import { getAuthorFetching } from '../../redux/authors' import { getAuthorFetching } from '../../redux/authors'
import { ValidatedTextField, MenuItem } from './FormItems' import { ValidatedTextField, MenuItem } from './FormItems'
const emailRegex = new RegExp(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/) const emailRegex = new RegExp(
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i, //eslint-disable-line
)
const emailValidator = value => const emailValidator = value =>
emailRegex.test(value) ? undefined : 'Invalid email' emailRegex.test(value) ? undefined : 'Invalid email'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment