MCPcopy Create free account
hub / github.com/Lemoncode/fonk / validator

Function validator

src/validators/email.ts:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12const isValidField = (value): boolean => isValidPattern(value, EMAIL_PATTERN);
13
14export const validator: FieldValidationFunctionSync = fieldValidatorArgs => {
15 const { value, message = defaultMessage } = fieldValidatorArgs;
16
17 const succeeded = isValidField(value);
18
19 return {
20 succeeded,
21 message: (succeeded ? '' : message) as string,
22 type: VALIDATOR_TYPE,
23 };
24};

Callers 1

email.spec.tsFile · 0.90

Calls 1

isValidFieldFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…