From 8280f94ad05a0cc00784f7a34bece22bbb7c383a Mon Sep 17 00:00:00 2001 From: spaenleh Date: Mon, 4 Nov 2024 15:59:32 +0100 Subject: [PATCH] fix: add code origin comment --- src/validation/isByteLength.ts | 5 +++++ src/validation/isEmail.ts | 4 ++++ src/validation/isFQDN.ts | 4 ++++ src/validation/isIP.ts | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/src/validation/isByteLength.ts b/src/validation/isByteLength.ts index 9e775b1f..53a320c7 100644 --- a/src/validation/isByteLength.ts +++ b/src/validation/isByteLength.ts @@ -1,3 +1,8 @@ +/** + * This code was adapted from the `validator.js` package + * https://github.com/validatorjs/validator.js/tree/master + */ + export function isByteLength( str: string, options?: Partial<{ min: number; max: number }>, diff --git a/src/validation/isEmail.ts b/src/validation/isEmail.ts index 4fa40466..abd02272 100644 --- a/src/validation/isEmail.ts +++ b/src/validation/isEmail.ts @@ -1,3 +1,7 @@ +/** + * This code was adapted from the `validator.js` package + * https://github.com/validatorjs/validator.js/tree/master + */ import { isByteLength } from './isByteLength.js'; import { isFQDN } from './isFQDN.js'; import { isIP } from './isIP.js'; diff --git a/src/validation/isFQDN.ts b/src/validation/isFQDN.ts index d897d185..5bb7828b 100644 --- a/src/validation/isFQDN.ts +++ b/src/validation/isFQDN.ts @@ -1,3 +1,7 @@ +/** + * This code was adapted from the `validator.js` package + * https://github.com/validatorjs/validator.js/tree/master + */ import { merge } from './utils.js'; const DEFAULT_FQDN_OPTIONS = { diff --git a/src/validation/isIP.ts b/src/validation/isIP.ts index 1d95a952..ec8ad10c 100644 --- a/src/validation/isIP.ts +++ b/src/validation/isIP.ts @@ -1,3 +1,7 @@ +/** + * This code was adapted from the `validator.js` package + * https://github.com/validatorjs/validator.js/tree/master + */ /** 11.3. Examples