mobilizon/js/src/utils/validators.ts
Thomas Citharel da42522073
Fix eslint warnings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-30 12:48:21 +01:00

8 lines
233 B
TypeScript

export function validateEmailField(value: string): boolean | string {
return value.includes("@") || "Invalid e-mail.";
}
export function validateRequiredField(value: unknown): boolean | string {
return !!value || "Required.";
}