@utils-fns/validators
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -1,2 +0,2 @@ | ||
export { default as validators } from './lib/index'; | ||
export { default as validators, TypesValidators } from './lib/index'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './email'; | ||
export * from './phone'; | ||
export * from './paymentCardValidator'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,10 +0,23 @@ | ||
export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index'; | ||
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index'; | ||
export type TypesValidators = { | ||
EmailValidator: EmailValidator; | ||
MinMaxParamsEmail: MinMaxParamsEmail; | ||
ParamsValidatorEmail: ParamsValidatorEmail; | ||
PhoneValidator: PhoneValidator; | ||
ParamsPhoneValidator: ParamsPhoneValidator; | ||
CustomPatternPhone: CustomPatternPhone; | ||
BrandCard: BrandCard; | ||
ParamsPaymentCardValidator: ParamsPaymentCardValidator; | ||
PaymentCardValidator: PaymentCardValidator; | ||
TypeCard: TypeCard; | ||
}; | ||
declare const validators: { | ||
cpf: (cpf?: string | undefined) => boolean; | ||
cnpj: (cnpj?: string | undefined) => boolean; | ||
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean; | ||
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean; | ||
nis: (nis?: string | undefined) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean; | ||
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean; | ||
}; | ||
export default validators; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export { default as validators } from './lib/index'; | ||
export { default as validators, TypesValidators } from './lib/index'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './email'; | ||
export * from './phone'; | ||
export * from './paymentCardValidator'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,10 +0,23 @@ | ||
export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index'; | ||
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index'; | ||
export type TypesValidators = { | ||
EmailValidator: EmailValidator; | ||
MinMaxParamsEmail: MinMaxParamsEmail; | ||
ParamsValidatorEmail: ParamsValidatorEmail; | ||
PhoneValidator: PhoneValidator; | ||
ParamsPhoneValidator: ParamsPhoneValidator; | ||
CustomPatternPhone: CustomPatternPhone; | ||
BrandCard: BrandCard; | ||
ParamsPaymentCardValidator: ParamsPaymentCardValidator; | ||
PaymentCardValidator: PaymentCardValidator; | ||
TypeCard: TypeCard; | ||
}; | ||
declare const validators: { | ||
cpf: (cpf?: string | undefined) => boolean; | ||
cnpj: (cnpj?: string | undefined) => boolean; | ||
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean; | ||
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean; | ||
nis: (nis?: string | undefined) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean; | ||
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean; | ||
}; | ||
export default validators; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,1 +1,17 @@ | ||
import { TypesUtils } from '@utils-fns/utils'; | ||
type MinMaxParamsEmail = { | ||
min?: number; | ||
max?: number; | ||
}; | ||
type ParamsValidatorEmail = { | ||
minMaxUserNameEmail?: MinMaxParamsEmail; | ||
minMaxEmailDomain?: MinMaxParamsEmail; | ||
emailDomainName?: RegExp; | ||
}; | ||
type EmailValidator = { | ||
email?: string; | ||
paramsEmailValidator?: ParamsValidatorEmail; | ||
}; | ||
type CustomPatternPhone = { | ||
@@ -18,16 +34,26 @@ coutryCode: RegExp; | ||
type MinMaxParamsEmail = { | ||
min?: number; | ||
max?: number; | ||
type TypeCard = 'credit' | 'debit' | 'credit-debit'; | ||
type BrandCard = TypesUtils['BrandCardType']; | ||
type ParamsPaymentCardValidator = { | ||
validationTypeCard?: TypeCard; | ||
specificBrandCard?: BrandCard; | ||
customPatternPaymentCard?: RegExp; | ||
}; | ||
type ParamsValidatorEmail = { | ||
minMaxUserNameEmail?: MinMaxParamsEmail; | ||
minMaxEmailDomain?: MinMaxParamsEmail; | ||
emailDomainName?: RegExp; | ||
type PaymentCardValidator = { | ||
cardNumber?: string; | ||
paramsPaymentCardValidator?: ParamsPaymentCardValidator; | ||
}; | ||
type EmailValidator = { | ||
email?: string; | ||
paramsEmailValidator?: ParamsValidatorEmail; | ||
type TypesValidators = { | ||
EmailValidator: EmailValidator; | ||
MinMaxParamsEmail: MinMaxParamsEmail; | ||
ParamsValidatorEmail: ParamsValidatorEmail; | ||
PhoneValidator: PhoneValidator; | ||
ParamsPhoneValidator: ParamsPhoneValidator; | ||
CustomPatternPhone: CustomPatternPhone; | ||
BrandCard: BrandCard; | ||
ParamsPaymentCardValidator: ParamsPaymentCardValidator; | ||
PaymentCardValidator: PaymentCardValidator; | ||
TypeCard: TypeCard; | ||
}; | ||
declare const validators: { | ||
@@ -39,5 +65,5 @@ cpf: (cpf?: string | undefined) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean; | ||
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map | ||
export { validators }; | ||
export { TypesValidators, validators }; |
@@ -1,2 +0,2 @@ | ||
export { default as validators } from './lib/index'; | ||
export { default as validators, TypesValidators } from './lib/index'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './email'; | ||
export * from './phone'; | ||
export * from './paymentCardValidator'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,10 +0,23 @@ | ||
export type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, } from './contracts/index'; | ||
import type { EmailValidator, MinMaxParamsEmail, ParamsValidatorEmail, PhoneValidator, ParamsPhoneValidator, CustomPatternPhone, BrandCard, ParamsPaymentCardValidator, PaymentCardValidator, TypeCard } from './contracts/index'; | ||
export type TypesValidators = { | ||
EmailValidator: EmailValidator; | ||
MinMaxParamsEmail: MinMaxParamsEmail; | ||
ParamsValidatorEmail: ParamsValidatorEmail; | ||
PhoneValidator: PhoneValidator; | ||
ParamsPhoneValidator: ParamsPhoneValidator; | ||
CustomPatternPhone: CustomPatternPhone; | ||
BrandCard: BrandCard; | ||
ParamsPaymentCardValidator: ParamsPaymentCardValidator; | ||
PaymentCardValidator: PaymentCardValidator; | ||
TypeCard: TypeCard; | ||
}; | ||
declare const validators: { | ||
cpf: (cpf?: string | undefined) => boolean; | ||
cnpj: (cnpj?: string | undefined) => boolean; | ||
email: ({ email, paramsEmailValidator, }: import("./contracts/email").EmailValidator) => boolean; | ||
email: ({ email, paramsEmailValidator, }: EmailValidator) => boolean; | ||
nis: (nis?: string | undefined) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: import("./contracts/phone").PhoneValidator) => boolean; | ||
phone: ({ phone, paramsPhoneValidator, }: PhoneValidator) => boolean; | ||
paymentCardValidator: ({ cardNumber, paramsPaymentCardValidator, }: PaymentCardValidator) => boolean; | ||
}; | ||
export default validators; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@utils-fns/validators", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"main": "dist/cjs/index.ts", | ||
@@ -22,2 +22,3 @@ "module": "dist/esm/index.ts", | ||
"@caiocezarqueiroz/eslint-config": "^1.0.20", | ||
"@utils-fns/utils": "*", | ||
"@rollup/plugin-commonjs": "^25.0.0", | ||
@@ -24,0 +25,0 @@ "@rollup/plugin-json": "^6.0.0", |
@@ -19,3 +19,3 @@ # @utils-fns/validators | ||
- [x] **phoneValidator** | ||
- [ ] **creditcardValidator (luhn algorithm)** | ||
- [ ] **paymentCardValidator (luhn algorithm)** | ||
- [ ] **paymentSlipValidator (ITF-14)** | ||
@@ -22,0 +22,0 @@ - [ ] **stateRegistrationValidator (inscrição estadual - BR)** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6005476
125
108645
16
1