mobilizon.chapril.org-mobil.../js/src/utils/validators.ts

8 lines
233 B
TypeScript
Raw Normal View History

export function validateEmailField(value: string): boolean | string {
return value.includes("@") || "Invalid e-mail.";
2019-01-11 13:58:29 +01:00
}
export function validateRequiredField(value: unknown): boolean | string {
return !!value || "Required.";
2019-01-11 13:58:29 +01:00
}