@nhtio/validation
Namespaces
| Namespace | Description |
|---|---|
| address | Validate email address and domain. A local version of the @hapi/address package used to ensure matching versions. |
| formula | Math and string formula parser. A local version of the @hapi/formula package used to ensure matching versions. |
| guards | Type Guards used throughout the package |
| location | Return the filename and line number of the calling function. A local version of the @hapi/pinpoint package is used to ensure matching versions. |
Interfaces
| Interface | Description |
|---|---|
| AddRuleOptions | - |
| AlternativesSchema | Schema type for alternatives validation. |
| AnySchema | Base schema type for all validation schemas. |
| ArraySchema | Schema type for array validation. |
| ArraySortOptions | - |
| ArrayUniqueOptions | - |
| AsyncValidationOptions | - |
| Base64Options | - |
| BaseValidationOptions | - |
| BigIntSchema | Schema type for BigInt validation with comprehensive comparison operations. |
| BinarySchema | Schema type for binary data validation. |
| BooleanSchema | Schema type for boolean validation. |
| Cache | - |
| CacheConfiguration | - |
| CacheProvisionOptions | - |
| CoerceObject | - |
| CoerceResult | - |
| CompileOptions | - |
| Context | - |
| CreateErrorOptions | - |
| CustomHelpers | - |
| DatabaseQueryBuilderContract | Database query builder exposes the API to construct SQL query using fluent chainable API |
| DataUriOptions | - |
| DateSchema | Schema type for date validation. |
| DatetimeSchema | Schema for datetime validation with comprehensive formatting and comparison methods. |
| DbValidationOptions | Options for database-backed validation helpers such as uniqueInDb and existsInDb. |
| DependencyOptions | - |
| Description | - |
| DomainOptions | - |
| EmailOptions | - |
| Err | - |
| ErrorFormattingOptions | - |
| ErrorReport | - |
| ErrorValidationOptions | - |
| Extension | - |
| ExtensionFlag | - |
| ExtensionRule | - |
| ExtensionTerm | - |
| ExtensionTermManifest | - |
| ExternalHelpers | - |
| FunctionSchema | Schema type for function validation. |
| GetRuleOptions | - |
| GuidOptions | - |
| HexOptions | - |
| HierarchySeparatorOptions | - |
| I18nCallback | Callback function type for internationalization translation. |
| IpOptions | - |
| IsSchemaOptions | - |
| KnexConnectionConfigurations | - |
| LanguageMessageTemplate | - |
| LinkSchema | Schema type for link validation. |
| ModifyOptions | - |
| MutateRegisterOptions | - |
| NumberSchema | Schema type for number validation. |
| ObjectPatternOptions | - |
| ObjectSchema | Schema type for object validation. |
| PhoneSchema | Phone number validation schema interface extending AnySchema. Provides methods for validating and formatting phone numbers with various constraints. |
| QueryClientContract | Shape of the query client, that is used to retrieve instances of query builder |
| Reference | - |
| ReferenceOptions | - |
| RenameOptions | - |
| Root | - |
| RuleArgs | - |
| RuleOptions | - |
| SchemaInternals | - |
| SetFlagOptions | - |
| SetI18nCallback | Callback function type for setting up internationalization. |
| State | - |
| StringRegexOptions | - |
| StringSchema | Schema type for string validation. |
| SwitchCases | - |
| SwitchDefault | - |
| SymbolSchema | Schema type for symbol validation. |
| TopLevelDomainOptions | - |
| UriOptions | - |
| ValidationContext | - |
| ValidationError | - |
| ValidationErrorItem | - |
| ValidationOptions | - |
| ValidationRoot | Extended Joi root interface that includes custom schema types for additional validation scenarios. |
| ValidationWarning | - |
| WhenOptions | - |
| WhenSchemaOptions | - |
Type Aliases
| Type Alias | Description |
|---|---|
| BasicType | - |
| CoerceFunction | - |
| ComparatorFunction | - |
| Country | Represents the ISO 3166-1 alpha-2 country codes of all countries recognized by the library. |
| CountryOrUnknown | Represents either the ISO 3166-1 alpha-2 country codes of all countries recognized by the library or the string 'XX' to represent an unknown country. |
| CustomValidator | - |
| DefaultableValue | - |
| ExtensionBoundSchema | - |
| ExtensionFactory | - |
| ExternalValidationFunction | - |
| GuidVersions | - |
| IsNonPrimitiveSubsetUnion | - |
| IsPrimitiveSubset | - |
| IsUnion | - |
| KnexConfig | - |
| KnexInstance | - |
| KnexQueryBuilder | - |
| KnexSchemaConnection | - |
| KnexTransaction | - |
| LanguageMessages | - |
| NoNestedArrays | - |
| NullableType | - |
| ObjectPropertiesSchema | - |
| PartialSchemaMap | - |
| PhoneTypes | The PhoneTypes type represents the possible types of a phone number. It can be any of the keys of the PhoneNumberType object in the google-libphonenumber library, or 'INVALID' if the phone number is not valid. |
| PhoneTypes | The PhoneTypes type represents the possible types of a phone number. It can be any of the keys of the PhoneNumberType object in the google-libphonenumber library, or 'INVALID' if the phone number is not valid. |
| PresenceMode | - |
| Primitives | - |
| QueryBuilder | - |
| QueryClient | - |
| RuleMethod | - |
| Schema | A union type that includes all schema types. |
| SchemaFunction | - |
| SchemaLike | - |
| SchemaLikeWithoutArray | - |
| SchemaMap | - |
| StrictSchemaMap | - |
| Types | - |
| UnwrapSchemaLikeWithoutArray | - |
| ValidationErrorFunction | - |
| ValidationResult | - |
Variables
| Variable | Description |
|---|---|
| tlds | TLDS list for domain validation. A local version of the @hapi/tlds package is used to ensure matching versions. |
| ValidationError | Represents a validation error encountered during the validation of a payload. When using syncronous validation, this error is returned along an undefined value. When using asynchronous validation, this error is thrown. |
| validator | - |
| version | The current version of the package. |
Functions
| Function | Description |
|---|---|
| decode | Decodes a base64-encoded schema string back into a usable validation schema. |
| encode | Encodes a validation schema into a compressed, base64-encoded string for transport between environments. |
| location | Return the filename and line number of the calling function. A local version of the @hapi/pinpoint package is used to ensure matching versions. |