fix: added validate email function in utils
This commit is contained in:
parent
2a6a7a852f
commit
5866adfa5e
@ -106,3 +106,9 @@ export function formatNumberIntoCurrency(value) {
|
||||
export function startCase(str) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
||||
export function validateEmail(email) {
|
||||
let regExp =
|
||||
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||
return regExp.test(email)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user