feat: improve input validation for register form
This commit is contained in:
parent
f7eb160509
commit
05e054f501
4 changed files with 58 additions and 7 deletions
6
src/helpers/isEmail.ts
Normal file
6
src/helpers/isEmail.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export function isEmail(email: string): Boolean {
|
||||
const format = /^.+@.+$/
|
||||
const match = email.match(format)
|
||||
|
||||
return match === null ? false : match.length > 0
|
||||
}
|
||||
Reference in a new issue