change exports

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-11 18:19:32 +02:00
parent c450e5cd8a
commit 548c56cb00
1 changed files with 3 additions and 8 deletions

View File

@ -1,12 +1,7 @@
function emailValidator (value) {
export function emailValidator (value) {
return (value && !!value.match(/^(([^<>()[\]\\.,;:\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,}))$/)) || 'Please enter a valid email'
}
function requiredValidator (value) {
export function requiredValidator (value) {
return (value !== undefined && value !== null && value !== '') || 'This field is required'
}
export {
emailValidator,
requiredValidator
}
}