add: email address format verification
This commit is contained in:
parent
33ff1400b0
commit
e52bccc0a0
@ -17,7 +17,8 @@ const components = {
|
||||
}
|
||||
|
||||
const SocialIcon = ({ kind, href, size = 8 }) => {
|
||||
if (!href) return null
|
||||
if (!href || (kind === 'mail' && !/^mailto:\w+([.-]?\w+)@\w+([.-]?\w+)(.\w{2,3})+$/.test(href)))
|
||||
return null
|
||||
|
||||
const SocialSvg = components[kind]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user