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

Function isValidField

src/validators/email.ts:12–12  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

10const EMAIL_PATTERN = /^(([^<>()\[\]\\.,;:\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,}))$/;
11
12const isValidField = (value): boolean => isValidPattern(value, EMAIL_PATTERN);
13
14export const validator: FieldValidationFunctionSync = fieldValidatorArgs => {
15 const { value, message = defaultMessage } = fieldValidatorArgs;

Callers 1

validatorFunction · 0.70

Calls 1

isValidPatternFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…