mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-12 08:07:14 -07:00
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:
parent
8d3db89327
commit
91f56b42de
47 changed files with 1027 additions and 146 deletions
8
frontend/composables/use-validators.ts
Normal file
8
frontend/composables/use-validators.ts
Normal 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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue