Pattern improvement

This commit is contained in:
Qolzam
2017-09-28 18:15:18 +07:00
parent b198717ae9
commit 0a9db2449f
3 changed files with 57 additions and 27 deletions

13
app/api/StringAPI.jsx Normal file
View File

@@ -0,0 +1,13 @@
// - Import react component
import { storageRef } from 'app/firebase/'
//- Import actions
const isValidEmail = (email) => {
var re = /^(([^<>()\[\]\\.,;:\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 re.test(email)
}
export default {
isValidEmail
}