mirror of https://github.com/Budibase/budibase.git
1 changed files with 3 additions and 8 deletions
@ -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 |
|||
} |
|||
} |
|||
Loading…
Reference in new issue