build: switch from yarn to npm to manage js dependencies and move js contents to root
yarn v1 is being deprecated and starts to have some issues Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
7
src/utils/validators.ts
Normal file
7
src/utils/validators.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function validateEmailField(value: string): boolean | string {
|
||||
return value.includes("@") || "Invalid e-mail.";
|
||||
}
|
||||
|
||||
export function validateRequiredField(value: unknown): boolean | string {
|
||||
return !!value || "Required.";
|
||||
}
|
||||
Reference in New Issue
Block a user