dpfv
v2.4.0
Published
dp-fields-validation
Downloads
393
Readme
const EMAIL_REQUIRED = (error: string = errorMessage) => string().email().required(error);
const FIRSTNAME = (error: string = errorMessage) => string().min(1, error);
const FIRSTNAME_REQUIRED = (error: string = errorMessage) => string().required(error);
const PASSWORD = (error: string = errorMessage) => string().min(8, error).max(64, error);
const PASSWORD_REQUIRED = (error: string = errorMessage) => string().min(8).max(64).required(error);
const PHONE_PREFIX = (error: string = errorMessage) => string().matches(prefixRegExp, error);
const PHONE_PREFIX_REQUIRED = (error: string = errorMessage) => string().matches(prefixRegExp, error);
const PHONE_NUMBER = (error: string = errorMessage) => string().phone(error);
const PHONE_NUMBER_REQUIRED = (error: string = errorMessage) => string().phone().required(error);
const ADDRESS = (error: string = errorMessage) => string().max(300, error);
const ADDRESS_REQUIRED = (error: string = errorMessage) => string().max(300).required(error);
const COUNTRY = (error: string = errorMessage) => string().min(2);
const COUNTRY_REQUIRED = (error: string = errorMessage) => string().min(2).required();
const NATIONALITY = (error: string = errorMessage) => string().min(2);
const NATIONALITY_REQUIRED = (error: string = errorMessage) => string().min(2).required();
const LOCALE = (error: string = errorMessage) => string().matches(unicodeLocaleRegExp, error);
const LOCALE_REQUIRED = (error: string = errorMessage) => string().matches(unicodeLocaleRegExp).required(error);
const PASSPORT = (error: string = errorMessage) => string().matches(passportRegexp, error);
const PASSPORT_REQUIRED = (error: string = errorMessage) => string().matches(passportRegexp).required(error);
const OTP = (error: string = errorMessage) => string().length(4, error)
const OTP_REQUIRED = (error: string = errorMessage) => string().length(4).required(error)
const PROJECT = (error: string = errorMessage) => string().oneOf(["properties","corporate"])
const PROJECT_REQUIRED = (error: string = errorMessage) => string().oneOf(["properties","corporate"]).required(error)