refactor(frontend): 🏗️ scafold pages and componenets folder

Setup the file structure for components, pages, layouts, api, and all new frontend structure
This commit is contained in:
hay-kot 2021-07-31 14:45:28 -08:00
parent 8d3db89327
commit 91f56b42de
47 changed files with 1027 additions and 146 deletions

View file

@ -0,0 +1,8 @@
const EMAIL_REGEX =
/^(([^<>()[\]\\.,;:\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,}))$/
export const validators = {
required: (v: string) => !!v || "This Field is Required",
email: (v: string) => !v || EMAIL_REGEX.test(v) || "Email Must Be Valid",
whitespace: (v: string) => !v || v.split(" ").length <= 1 || "No Whitespace Allowed"
}