@archbase/core 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/archbase-core-3.0.0.tgz +0 -0
- package/dist/context/ArchbaseAppContext.d.ts +43 -0
- package/dist/context/ArchbaseGlobalProvider.d.ts +33 -0
- package/dist/context/ArchbaseSimpleAppContext.d.ts +34 -0
- package/dist/context/index.d.ts +5 -0
- package/dist/error/ArchbaseError.d.ts +14 -0
- package/dist/error/index.d.ts +11 -0
- package/dist/errorboundary/ArchbaseErrorBoundary.d.ts +21 -0
- package/dist/errorboundary/ArchbaseErrorBoundaryContext.d.ts +6 -0
- package/dist/errorboundary/ArchbaseErrorFallback.d.ts +7 -0
- package/dist/errorboundary/assertArchbaseErrorBoundaryContext.d.ts +2 -0
- package/dist/errorboundary/index.d.ts +6 -0
- package/dist/errorboundary/types.d.ts +39 -0
- package/dist/errorboundary/useArchbaseErrorBoundary.d.ts +5 -0
- package/dist/errorboundary/withArchbaseErrorBoundary.d.ts +3 -0
- package/dist/exceptions/ApiError.d.ts +27 -0
- package/dist/exceptions/ArchbaseErrorHelper.d.ts +2 -0
- package/dist/exceptions/ArchbaseException.d.ts +9 -0
- package/dist/exceptions/index.d.ts +3 -0
- package/dist/fallback/ArchbaseSafeMigrationWrapper.d.ts +57 -0
- package/dist/helper/ArchbaseClickOutside.d.ts +9 -0
- package/dist/helper/ArchbaseObjectHelper.d.ts +9 -0
- package/dist/helper/index.d.ts +2 -0
- package/dist/hooks/ArchbaseDepencyManager.d.ts +70 -0
- package/dist/hooks/index.d.ts +15 -0
- package/dist/hooks/lifecycle/index.d.ts +54 -0
- package/dist/hooks/useArchbaseAsyncFunction.d.ts +1 -0
- package/dist/hooks/useArchbaseBool.d.ts +6 -0
- package/dist/hooks/useArchbaseForceRenderer.d.ts +1 -0
- package/dist/hooks/useArchbaseLatest.d.ts +3 -0
- package/dist/hooks/useArchbasePassiveLayoutEffect.d.ts +3 -0
- package/dist/hooks/useArchbasePasswordRemember.d.ts +11 -0
- package/dist/hooks/useArchbaseReducer.d.ts +21 -0
- package/dist/hooks/useArchbaseResizeObserver.d.ts +11 -0
- package/dist/hooks/useArchbaseSize.d.ts +12 -0
- package/dist/hooks/useArchbaseStateWithCallback.d.ts +2 -0
- package/dist/hooks/useArchbaseTextSelection.d.ts +14 -0
- package/dist/hooks/useArchbaseTheme.d.ts +6 -0
- package/dist/hooks/useArchbaseValidator.d.ts +2 -0
- package/dist/index.css +108 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +9728 -0
- package/dist/index.js.map +1 -0
- package/dist/ioc/ArchbaseIOCHelper.d.ts +56 -0
- package/dist/ioc/ArchbaseIOCTypes.d.ts +11 -0
- package/dist/ioc/index.d.ts +2 -0
- package/dist/json/ArchbaseJacksonParser.d.ts +15 -0
- package/dist/json/index.d.ts +1 -0
- package/dist/locales/config.d.ts +1781 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/rsql/ast/ComparisonOperator.d.ts +24 -0
- package/dist/rsql/ast/LogicOperator.d.ts +13 -0
- package/dist/rsql/ast/Node.d.ts +41 -0
- package/dist/rsql/ast/ReservedChars.d.ts +4 -0
- package/dist/rsql/ast/index.d.ts +4 -0
- package/dist/rsql/builder/index.d.ts +20 -0
- package/dist/rsql/emitter/index.d.ts +19 -0
- package/dist/rsql/index.d.ts +7 -0
- package/dist/rsql/parser/Error.d.ts +7 -0
- package/dist/rsql/parser/ParserContext.d.ts +15 -0
- package/dist/rsql/parser/ParserOperation.d.ts +43 -0
- package/dist/rsql/parser/ParserProduction.d.ts +14 -0
- package/dist/rsql/parser/index.d.ts +3 -0
- package/dist/rsql/parser/lexer/LexerContext.d.ts +8 -0
- package/dist/rsql/parser/lexer/LexerProcessor.d.ts +8 -0
- package/dist/rsql/parser/lexer/Token.d.ts +38 -0
- package/dist/rsql/parser/lexer/lex.d.ts +3 -0
- package/dist/rsql/parser/lexer/processors/scanNonReservedSymbol.d.ts +3 -0
- package/dist/rsql/parser/lexer/processors/scanSymbol.d.ts +3 -0
- package/dist/rsql/parser/lexer/processors/seekAnyToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekComparisonCustomOperatorToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekComparisonOperatorToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekLogicCanonicalOperatorToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekLogicVerboseOperatorToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekParenthesisToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekQuotedToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/seekUnquotedToken.d.ts +4 -0
- package/dist/rsql/parser/lexer/processors/skipWhitespace.d.ts +3 -0
- package/dist/types/OptionsResult.d.ts +8 -0
- package/dist/types/filter.d.ts +56 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/querybuilder.d.ts +85 -0
- package/dist/types/token.d.ts +50 -0
- package/dist/types/types.d.ts +5 -0
- package/dist/utils/archbaseLogo.d.ts +3 -0
- package/dist/utils/array.d.ts +1 -0
- package/dist/utils/convertImageToBase64.d.ts +1 -0
- package/dist/utils/deepFilter.d.ts +2 -0
- package/dist/utils/deepFind.d.ts +2 -0
- package/dist/utils/deepForEach.d.ts +2 -0
- package/dist/utils/deepMap.d.ts +2 -0
- package/dist/utils/dom.d.ts +2 -0
- package/dist/utils/enum-utils.d.ts +1 -0
- package/dist/utils/filter.d.ts +2 -0
- package/dist/utils/getElementName.d.ts +2 -0
- package/dist/utils/groupByType.d.ts +2 -0
- package/dist/utils/hasChildren.d.ts +4 -0
- package/dist/utils/hasComplexChildren.d.ts +4 -0
- package/dist/utils/index.d.ts +24 -0
- package/dist/utils/isBase64.d.ts +1 -0
- package/dist/utils/isEmail.d.ts +1 -0
- package/dist/utils/masker.d.ts +27 -0
- package/dist/utils/nestedObject.d.ts +7 -0
- package/dist/utils/object.d.ts +10 -0
- package/dist/utils/objectPrototype.d.ts +2 -0
- package/dist/utils/onlyText.d.ts +3 -0
- package/dist/utils/onlyValid.d.ts +2 -0
- package/dist/utils/propertyUtils.d.ts +1 -0
- package/dist/utils/string-utils.d.ts +138 -0
- package/dist/utils/string.d.ts +11 -0
- package/dist/validation/ValidationErrorsContext.d.ts +25 -0
- package/dist/validator/ArchbaseValidator.d.ts +21 -0
- package/dist/validator/container.d.ts +25 -0
- package/dist/validator/decorator/ValidationOptions.d.ts +25 -0
- package/dist/validator/decorator/array/ArrayContains.d.ts +12 -0
- package/dist/validator/decorator/array/ArrayMaxSize.d.ts +12 -0
- package/dist/validator/decorator/array/ArrayMinSize.d.ts +12 -0
- package/dist/validator/decorator/array/ArrayNotContains.d.ts +12 -0
- package/dist/validator/decorator/array/ArrayNotEmpty.d.ts +12 -0
- package/dist/validator/decorator/array/ArrayUnique.d.ts +13 -0
- package/dist/validator/decorator/common/Allow.d.ts +5 -0
- package/dist/validator/decorator/common/Equals.d.ts +10 -0
- package/dist/validator/decorator/common/IsDefined.d.ts +10 -0
- package/dist/validator/decorator/common/IsEmpty.d.ts +10 -0
- package/dist/validator/decorator/common/IsIn.d.ts +10 -0
- package/dist/validator/decorator/common/IsLatLong.d.ts +10 -0
- package/dist/validator/decorator/common/IsLatitude.d.ts +10 -0
- package/dist/validator/decorator/common/IsLongitude.d.ts +10 -0
- package/dist/validator/decorator/common/IsNotEmpty.d.ts +10 -0
- package/dist/validator/decorator/common/IsNotIn.d.ts +10 -0
- package/dist/validator/decorator/common/IsOptional.d.ts +5 -0
- package/dist/validator/decorator/common/NotEquals.d.ts +10 -0
- package/dist/validator/decorator/common/Validate.d.ts +14 -0
- package/dist/validator/decorator/common/ValidateBy.d.ts +11 -0
- package/dist/validator/decorator/common/ValidateIf.d.ts +5 -0
- package/dist/validator/decorator/common/ValidateNested.d.ts +5 -0
- package/dist/validator/decorator/common/ValidatePromise.d.ts +5 -0
- package/dist/validator/decorator/date/MaxDate.d.ts +10 -0
- package/dist/validator/decorator/date/MinDate.d.ts +10 -0
- package/dist/validator/decorator/decorators.d.ts +111 -0
- package/dist/validator/decorator/number/IsDivisibleBy.d.ts +10 -0
- package/dist/validator/decorator/number/IsNegative.d.ts +10 -0
- package/dist/validator/decorator/number/IsPositive.d.ts +10 -0
- package/dist/validator/decorator/number/Max.d.ts +10 -0
- package/dist/validator/decorator/number/Min.d.ts +10 -0
- package/dist/validator/decorator/object/IsInstance.d.ts +10 -0
- package/dist/validator/decorator/object/IsNotEmptyObject.d.ts +16 -0
- package/dist/validator/decorator/string/Contains.d.ts +12 -0
- package/dist/validator/decorator/string/IsAlpha.d.ts +12 -0
- package/dist/validator/decorator/string/IsAlphanumeric.d.ts +12 -0
- package/dist/validator/decorator/string/IsAscii.d.ts +12 -0
- package/dist/validator/decorator/string/IsBIC.d.ts +12 -0
- package/dist/validator/decorator/string/IsBase32.d.ts +12 -0
- package/dist/validator/decorator/string/IsBase58.d.ts +12 -0
- package/dist/validator/decorator/string/IsBase64.d.ts +12 -0
- package/dist/validator/decorator/string/IsBooleanString.d.ts +12 -0
- package/dist/validator/decorator/string/IsBtcAddress.d.ts +12 -0
- package/dist/validator/decorator/string/IsByteLength.d.ts +12 -0
- package/dist/validator/decorator/string/IsCreditCard.d.ts +12 -0
- package/dist/validator/decorator/string/IsCurrency.d.ts +12 -0
- package/dist/validator/decorator/string/IsDataURI.d.ts +12 -0
- package/dist/validator/decorator/string/IsDateString.d.ts +10 -0
- package/dist/validator/decorator/string/IsDecimal.d.ts +12 -0
- package/dist/validator/decorator/string/IsEAN.d.ts +12 -0
- package/dist/validator/decorator/string/IsEmail.d.ts +12 -0
- package/dist/validator/decorator/string/IsEthereumAddress.d.ts +12 -0
- package/dist/validator/decorator/string/IsFQDN.d.ts +12 -0
- package/dist/validator/decorator/string/IsFirebasePushId.d.ts +12 -0
- package/dist/validator/decorator/string/IsFullWidth.d.ts +12 -0
- package/dist/validator/decorator/string/IsHSL.d.ts +14 -0
- package/dist/validator/decorator/string/IsHalfWidth.d.ts +12 -0
- package/dist/validator/decorator/string/IsHash.d.ts +14 -0
- package/dist/validator/decorator/string/IsHexColor.d.ts +12 -0
- package/dist/validator/decorator/string/IsHexadecimal.d.ts +12 -0
- package/dist/validator/decorator/string/IsIBAN.d.ts +12 -0
- package/dist/validator/decorator/string/IsIP.d.ts +13 -0
- package/dist/validator/decorator/string/IsISBN.d.ts +13 -0
- package/dist/validator/decorator/string/IsISIN.d.ts +12 -0
- package/dist/validator/decorator/string/IsISO31661Alpha2.d.ts +10 -0
- package/dist/validator/decorator/string/IsISO31661Alpha3.d.ts +10 -0
- package/dist/validator/decorator/string/IsISO8601.d.ts +14 -0
- package/dist/validator/decorator/string/IsISRC.d.ts +12 -0
- package/dist/validator/decorator/string/IsISSN.d.ts +12 -0
- package/dist/validator/decorator/string/IsIdentityCard.d.ts +16 -0
- package/dist/validator/decorator/string/IsJSON.d.ts +12 -0
- package/dist/validator/decorator/string/IsJWT.d.ts +12 -0
- package/dist/validator/decorator/string/IsLocale.d.ts +12 -0
- package/dist/validator/decorator/string/IsLowercase.d.ts +12 -0
- package/dist/validator/decorator/string/IsMacAddress.d.ts +13 -0
- package/dist/validator/decorator/string/IsMagnetURI.d.ts +12 -0
- package/dist/validator/decorator/string/IsMilitaryTime.d.ts +12 -0
- package/dist/validator/decorator/string/IsMimeType.d.ts +12 -0
- package/dist/validator/decorator/string/IsMobilePhone.d.ts +28 -0
- package/dist/validator/decorator/string/IsMongoId.d.ts +12 -0
- package/dist/validator/decorator/string/IsMultibyte.d.ts +12 -0
- package/dist/validator/decorator/string/IsNumberString.d.ts +12 -0
- package/dist/validator/decorator/string/IsOctal.d.ts +12 -0
- package/dist/validator/decorator/string/IsPassportNumber.d.ts +12 -0
- package/dist/validator/decorator/string/IsPhoneNumber.d.ts +19 -0
- package/dist/validator/decorator/string/IsPort.d.ts +10 -0
- package/dist/validator/decorator/string/IsPostalCode.d.ts +12 -0
- package/dist/validator/decorator/string/IsRFC3339.d.ts +12 -0
- package/dist/validator/decorator/string/IsRgbColor.d.ts +14 -0
- package/dist/validator/decorator/string/IsSemVer.d.ts +12 -0
- package/dist/validator/decorator/string/IsStrongPassword.d.ts +16 -0
- package/dist/validator/decorator/string/IsSurrogatePair.d.ts +12 -0
- package/dist/validator/decorator/string/IsTimeZone.d.ts +12 -0
- package/dist/validator/decorator/string/IsUUID.d.ts +12 -0
- package/dist/validator/decorator/string/IsUppercase.d.ts +12 -0
- package/dist/validator/decorator/string/IsUrl.d.ts +12 -0
- package/dist/validator/decorator/string/IsVariableWidth.d.ts +12 -0
- package/dist/validator/decorator/string/Length.d.ts +12 -0
- package/dist/validator/decorator/string/Matches.d.ts +14 -0
- package/dist/validator/decorator/string/MaxLength.d.ts +12 -0
- package/dist/validator/decorator/string/MinLength.d.ts +12 -0
- package/dist/validator/decorator/string/NotContains.d.ts +12 -0
- package/dist/validator/decorator/string/is-iso4217-currency-code.d.ts +10 -0
- package/dist/validator/decorator/string/is-tax-id.d.ts +20 -0
- package/dist/validator/decorator/typechecker/IsArray.d.ts +10 -0
- package/dist/validator/decorator/typechecker/IsBoolean.d.ts +10 -0
- package/dist/validator/decorator/typechecker/IsDate.d.ts +10 -0
- package/dist/validator/decorator/typechecker/IsEnum.d.ts +10 -0
- package/dist/validator/decorator/typechecker/IsInt.d.ts +10 -0
- package/dist/validator/decorator/typechecker/IsNumber.d.ts +18 -0
- package/dist/validator/decorator/typechecker/IsObject.d.ts +12 -0
- package/dist/validator/decorator/typechecker/IsString.d.ts +10 -0
- package/dist/validator/index.d.ts +49 -0
- package/dist/validator/metadata/ConstraintMetadata.d.ts +23 -0
- package/dist/validator/metadata/MetadataStorage.d.ts +42 -0
- package/dist/validator/metadata/ValidationMetadata.d.ts +53 -0
- package/dist/validator/metadata/ValidationMetadataArgs.d.ts +38 -0
- package/dist/validator/register-decorator.d.ts +36 -0
- package/dist/validator/utils/convert-to-array.util.d.ts +4 -0
- package/dist/validator/utils/get-global.util.d.ts +7 -0
- package/dist/validator/utils/index.d.ts +3 -0
- package/dist/validator/utils/is-promise.util.d.ts +1 -0
- package/dist/validator/validation/ValidationArguments.d.ts +26 -0
- package/dist/validator/validation/ValidationError.d.ts +42 -0
- package/dist/validator/validation/ValidationExecutor.d.ts +28 -0
- package/dist/validator/validation/ValidationTypes.d.ts +15 -0
- package/dist/validator/validation/ValidationUtils.d.ts +8 -0
- package/dist/validator/validation/Validator.d.ts +37 -0
- package/dist/validator/validation/ValidatorConstraintInterface.d.ts +14 -0
- package/dist/validator/validation/ValidatorOptions.d.ts +75 -0
- package/dist/validator/validation-schema/ValidationSchema.d.ts +57 -0
- package/dist/validator/validation-schema/ValidationSchemaToMetadataTransformer.d.ts +8 -0
- package/package.json +88 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ETHEREUM_ADDRESS = "isEthereumAddress";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is an Ethereum address using basic regex. Does not validate address checksums.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isEthereumAddress(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is an Ethereum address using basic regex. Does not validate address checksums.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsEthereumAddress(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_FQDN = "isFqdn";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a fully qualified domain name (e.g. domain.com).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isFQDN(value: unknown, options?: validator.IsFQDNOptions): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a fully qualified domain name (e.g. domain.com).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsFQDN(options?: validator.IsFQDNOptions, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_FIREBASE_PUSH_ID = "IsFirebasePushId";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a Firebase Push Id
|
|
5
|
+
* If given value is not a Firebase Push Id, it returns false
|
|
6
|
+
*/
|
|
7
|
+
export declare function isFirebasePushId(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a Firebase Push Id
|
|
10
|
+
* If given value is not a Firebase Push Id, it returns false
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsFirebasePushId(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_FULL_WIDTH = "isFullWidth";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string contains any full-width chars.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isFullWidth(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string contains any full-width chars.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsFullWidth(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_HSL = "isHSL";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification.
|
|
5
|
+
* Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)).
|
|
6
|
+
* If given value is not a string, then it returns false.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isHSL(value: unknown): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification.
|
|
11
|
+
* Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)).
|
|
12
|
+
* If given value is not a string, then it returns false.
|
|
13
|
+
*/
|
|
14
|
+
export declare function IsHSL(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_HALF_WIDTH = "isHalfWidth";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string contains any half-width chars.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isHalfWidth(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string contains any half-width chars.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsHalfWidth(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_HASH = "isHash";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a hash of type algorithm.
|
|
5
|
+
* Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128',
|
|
6
|
+
* 'tiger160', 'tiger192', 'crc32', 'crc32b']
|
|
7
|
+
*/
|
|
8
|
+
export declare function isHash(value: unknown, algorithm: validator.HashAlgorithm): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check if the string is a hash of type algorithm.
|
|
11
|
+
* Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128',
|
|
12
|
+
* 'tiger160', 'tiger192', 'crc32', 'crc32b']
|
|
13
|
+
*/
|
|
14
|
+
export declare function IsHash(algorithm: string, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_HEX_COLOR = "isHexColor";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a hexadecimal color.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isHexColor(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a hexadecimal color.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsHexColor(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_HEXADECIMAL = "isHexadecimal";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a hexadecimal number.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isHexadecimal(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a hexadecimal number.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsHexadecimal(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_IBAN = "isIBAN";
|
|
3
|
+
/**
|
|
4
|
+
* Check if a string is a IBAN (International Bank Account Number).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isIBAN(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if a string is a IBAN (International Bank Account Number).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsIBAN(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export type IsIpVersion = '4' | '6' | 4 | 6;
|
|
3
|
+
export declare const IS_IP = "isIp";
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the string is an IP (version 4 or 6).
|
|
6
|
+
* If given value is not a string, then it returns false.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isIP(value: unknown, version?: IsIpVersion): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the string is an IP (version 4 or 6).
|
|
11
|
+
* If given value is not a string, then it returns false.
|
|
12
|
+
*/
|
|
13
|
+
export declare function IsIP(version?: IsIpVersion, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export type IsISBNVersion = '10' | '13' | 10 | 13;
|
|
3
|
+
export declare const IS_ISBN = "isIsbn";
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the string is an ISBN (version 10 or 13).
|
|
6
|
+
* If given value is not a string, then it returns false.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isISBN(value: unknown, version?: IsISBNVersion): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the string is an ISBN (version 10 or 13).
|
|
11
|
+
* If given value is not a string, then it returns false.
|
|
12
|
+
*/
|
|
13
|
+
export declare function IsISBN(version?: IsISBNVersion, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISIN = "isIsin";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is an ISIN (stock/security identifier).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isISIN(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is an ISIN (stock/security identifier).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsISIN(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISO31661_ALPHA_2 = "isISO31661Alpha2";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isISO31661Alpha2(value: unknown): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Check if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code.
|
|
9
|
+
*/
|
|
10
|
+
export declare function IsISO31661Alpha2(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISO31661_ALPHA_3 = "isISO31661Alpha3";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isISO31661Alpha3(value: unknown): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Check if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code.
|
|
9
|
+
*/
|
|
10
|
+
export declare function IsISO31661Alpha3(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISO8601 = "isIso8601";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a valid ISO 8601 date.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
* Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isISO8601(value: unknown, options?: validator.IsISO8601Options): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the string is a valid ISO 8601 date.
|
|
11
|
+
* If given value is not a string, then it returns false.
|
|
12
|
+
* Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.
|
|
13
|
+
*/
|
|
14
|
+
export declare function IsISO8601(options?: validator.IsISO8601Options, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISRC = "isISRC";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a ISRC.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isISRC(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a ISRC.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsISRC(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_ISSN = "isISSN";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a ISSN.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isISSN(value: unknown, options?: validator.IsISSNOptions): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a ISSN.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsISSN(options?: validator.IsISSNOptions, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_IDENTITY_CARD = "isIdentityCard";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid identity card code.
|
|
5
|
+
* locale is one of ['ES', 'zh-TW', 'he-IL', 'ar-TN'] OR 'any'. If 'any' is used, function will check if any of the locals match.
|
|
6
|
+
* Defaults to 'any'.
|
|
7
|
+
* If given value is not a string, then it returns false.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isIdentityCard(value: unknown, locale: validator.IdentityCardLocale): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if the string is a valid identity card code.
|
|
12
|
+
* locale is one of ['ES', 'zh-TW', 'he-IL', 'ar-TN'] OR 'any'. If 'any' is used, function will check if any of the locals match.
|
|
13
|
+
* Defaults to 'any'.
|
|
14
|
+
* If given value is not a string, then it returns false.
|
|
15
|
+
*/
|
|
16
|
+
export declare function IsIdentityCard(locale?: validator.IdentityCardLocale, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_JSON = "isJson";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is valid JSON (note: uses JSON.parse).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isJSON(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is valid JSON (note: uses JSON.parse).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsJSON(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_JWT = "isJwt";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is valid JWT token.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isJWT(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is valid JWT token.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsJWT(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_LOCALE = "isLocale";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a locale.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isLocale(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a locale.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsLocale(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_LOWERCASE = "isLowercase";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is lowercase.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isLowercase(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is lowercase.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsLowercase(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MAC_ADDRESS = "isMacAddress";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a MAC address.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMACAddress(value: unknown, options?: validator.IsMACAddressOptions): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a MAC address.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMACAddress(optionsArg?: validator.IsMACAddressOptions, validationOptionsArg?: ValidationOptions): PropertyDecorator;
|
|
13
|
+
export declare function IsMACAddress(validationOptionsArg?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MAGNET_URI = "isMagnetURI";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a magnet uri format.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMagnetURI(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a magnet uri format.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMagnetURI(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MILITARY_TIME = "isMilitaryTime";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string represents a time without a given timezone in the format HH:MM (military)
|
|
5
|
+
* If the given value does not match the pattern HH:MM, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMilitaryTime(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string represents a time without a given timezone in the format HH:MM (military)
|
|
10
|
+
* If the given value does not match the pattern HH:MM, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMilitaryTime(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MIME_TYPE = "isMimeType";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string matches to a valid MIME type format
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMimeType(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string matches to a valid MIME type format
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMimeType(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MOBILE_PHONE = "isMobilePhone";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS'])
|
|
5
|
+
* OR one of ['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', ar-JO', 'ar-KW', 'ar-SA', 'ar-SY', 'ar-TN', 'be-BY',
|
|
6
|
+
* 'bg-BG', 'bn-BD', 'cs-CZ', 'da-DK', 'de-DE', 'de-AT', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-HK',
|
|
7
|
+
* 'en-MO', 'en-IE', 'en-IN', 'en-KE', 'en-MT', 'en-MU', 'en-NG', 'en-NZ', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-UG',
|
|
8
|
+
* 'en-US', 'en-TZ', 'en-ZA', 'en-ZM', 'es-CL', 'es-CR', 'es-EC', 'es-ES', 'es-MX', 'es-PA', 'es-PY', 'es-UY', 'et-EE',
|
|
9
|
+
* 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-RE', 'he-IL', 'hu-HU', 'id-ID',
|
|
10
|
+
* 'it-IT', 'ja-JP', 'kk-KZ', 'kl-GL', 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL',
|
|
11
|
+
* 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN',
|
|
12
|
+
* 'zh-HK', 'zh-MO', 'zh-TW']
|
|
13
|
+
* If given value is not a string, then it returns false.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isMobilePhone(value: unknown, locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS'])
|
|
18
|
+
* OR one of ['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', ar-JO', 'ar-KW', 'ar-SA', 'ar-SY', 'ar-TN', 'be-BY',
|
|
19
|
+
* 'bg-BG', 'bn-BD', 'cs-CZ', 'da-DK', 'de-DE', 'de-AT', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-HK',
|
|
20
|
+
* 'en-MO', 'en-IE', 'en-IN', 'en-KE', 'en-MT', 'en-MU', 'en-NG', 'en-NZ', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-UG',
|
|
21
|
+
* 'en-US', 'en-TZ', 'en-ZA', 'en-ZM', 'es-CL', 'es-CR', 'es-EC', 'es-ES', 'es-MX', 'es-PA', 'es-PY', 'es-UY', 'et-EE',
|
|
22
|
+
* 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-RE', 'he-IL', 'hu-HU', 'id-ID',
|
|
23
|
+
* 'it-IT', 'ja-JP', 'kk-KZ', 'kl-GL', 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL',
|
|
24
|
+
* 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN',
|
|
25
|
+
* 'zh-HK', 'zh-MO', 'zh-TW']
|
|
26
|
+
* If given value is not a string, then it returns false.
|
|
27
|
+
*/
|
|
28
|
+
export declare function IsMobilePhone(locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MONGO_ID = "isMongoId";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMongoId(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMongoId(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_MULTIBYTE = "isMultibyte";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string contains one or more multibyte chars.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isMultibyte(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string contains one or more multibyte chars.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsMultibyte(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_NUMBER_STRING = "isNumberString";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is numeric.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isNumberString(value: unknown, options?: validator.IsNumericOptions): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is numeric.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsNumberString(options?: validator.IsNumericOptions, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_OCTAL = "isOctal";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid octal number.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isOctal(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a valid octal number.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsOctal(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_PASSPORT_NUMBER = "isPassportNumber";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid passport number relative to a specific country code.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isPassportNumber(value: unknown, countryCode: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a valid passport number relative to a specific country code.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsPassportNumber(countryCode: string, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_PHONE_NUMBER = "isPhoneNumber";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a valid phone number. To successfully validate any phone number the text must include
|
|
5
|
+
* the intl. calling code, if the calling code wont be provided then the region must be set.
|
|
6
|
+
*
|
|
7
|
+
* @param value the potential phone number string to test
|
|
8
|
+
* @param region 2 characters uppercase country code (e.g. DE, US, CH) for country specific validation.
|
|
9
|
+
* If text doesn't start with the international calling code (e.g. +41), then you must set this parameter.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isPhoneNumber(value: string, region?: any): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the string is a valid phone number. To successfully validate any phone number the text must include
|
|
14
|
+
* the intl. calling code, if the calling code wont be provided then the region must be set.
|
|
15
|
+
*
|
|
16
|
+
* @param region 2 characters uppercase country code (e.g. DE, US, CH) for country specific validation.
|
|
17
|
+
* If text doesn't start with the international calling code (e.g. +41), then you must set this parameter.
|
|
18
|
+
*/
|
|
19
|
+
export declare function IsPhoneNumber(region?: any, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_PORT = "isPort";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid port number.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isPort(value: unknown): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Check if the string is a valid port number.
|
|
9
|
+
*/
|
|
10
|
+
export declare function IsPort(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_POSTAL_CODE = "isPostalCode";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a postal code, in the specified locale.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isPostalCode(value: unknown, locale: 'any' | validator.PostalCodeLocale): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a postal code, in the specified locale.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsPostalCode(locale?: 'any' | validator.PostalCodeLocale, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_RFC_3339 = "isRFC3339";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a valid RFC 3339 date.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isRFC3339(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a valid RFC 3339 date.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsRFC3339(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_RGB_COLOR = "isRgbColor";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a rgb or rgba color.
|
|
5
|
+
* `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.
|
|
6
|
+
* If given value is not a string, then it returns false.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isRgbColor(value: unknown, includePercentValues?: boolean): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check if the string is a rgb or rgba color.
|
|
11
|
+
* `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.
|
|
12
|
+
* If given value is not a string, then it returns false.
|
|
13
|
+
*/
|
|
14
|
+
export declare function IsRgbColor(includePercentValues?: boolean, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_SEM_VER = "isSemVer";
|
|
3
|
+
/**
|
|
4
|
+
* Check if the string is a Semantic Versioning Specification (SemVer).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isSemVer(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Check if the string is a Semantic Versioning Specification (SemVer).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsSemVer(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_STRONG_PASSWORD = "isStrongPassword";
|
|
3
|
+
/**
|
|
4
|
+
* Options to be passed to IsStrongPassword decorator.
|
|
5
|
+
*/
|
|
6
|
+
export type IsStrongPasswordOptions = Pick<validator.StrongPasswordOptions, 'minLength' | 'minLowercase' | 'minUppercase' | 'minNumbers' | 'minSymbols'>;
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the string is a strong password.
|
|
9
|
+
* If given value is not a string, then it returns false.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isStrongPassword(value: unknown, options?: IsStrongPasswordOptions): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the string is a strong password.
|
|
14
|
+
* If given value is not a string, then it returns false.
|
|
15
|
+
*/
|
|
16
|
+
export declare function IsStrongPassword(options?: IsStrongPasswordOptions, validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_SURROGATE_PAIR = "isSurrogatePair";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string contains any surrogate pairs chars.
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isSurrogatePair(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string contains any surrogate pairs chars.
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsSurrogatePair(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_TIMEZONE = "isTimeZone";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string represents a valid IANA timezone
|
|
5
|
+
* If the given value is not a valid IANA timezone, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTimeZone(value: unknown): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string represents a valid IANA timezone
|
|
10
|
+
* If the given value is not a valid IANA timezone, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsTimeZone(validationOptions?: ValidationOptions): PropertyDecorator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationOptions } from '../ValidationOptions';
|
|
2
|
+
export declare const IS_UUID = "isUuid";
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the string is a UUID (version 3, 4 or 5).
|
|
5
|
+
* If given value is not a string, then it returns false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isUUID(value: unknown, version?: any): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the string is a UUID (version 3, 4 or 5).
|
|
10
|
+
* If given value is not a string, then it returns false.
|
|
11
|
+
*/
|
|
12
|
+
export declare function IsUUID(version?: any, validationOptions?: ValidationOptions): PropertyDecorator;
|