Version: 4.2

Class: EntityValidator

Hierarchy#

  • EntityValidator

Constructors#

constructor#

+ new EntityValidator(strict: boolean): EntityValidator

Defined in packages/core/src/entity/EntityValidator.ts:6

Parameters:#

NameType
strictboolean

Returns: EntityValidator

Properties#

strict#

Private strict: boolean

Defined in packages/core/src/entity/EntityValidator.ts:8

Methods#

fixBooleanType#

PrivatefixBooleanType(givenValue: number): boolean | number

Defined in packages/core/src/entity/EntityValidator.ts:143

Parameters:#

NameType
givenValuenumber

Returns: boolean | number


fixDateType#

PrivatefixDateType(givenValue: string): Date | string

Defined in packages/core/src/entity/EntityValidator.ts:126

Parameters:#

NameType
givenValuestring

Returns: Date | string


fixNumberType#

PrivatefixNumberType(givenValue: string): number | string

Defined in packages/core/src/entity/EntityValidator.ts:138

Parameters:#

NameType
givenValuestring

Returns: number | string


fixTypes#

PrivatefixTypes(expectedType: string, givenType: string, givenValue: any): any

Defined in packages/core/src/entity/EntityValidator.ts:110

Parameters:#

NameType
expectedTypestring
givenTypestring
givenValueany

Returns: any


getValue#

PrivategetValue(o: Dictionary, prop: EntityProperty): any

Defined in packages/core/src/entity/EntityValidator.ts:87

Parameters:#

NameType
oDictionary
propEntityProperty

Returns: any


setValue#

PrivatesetValue(o: Dictionary, prop: EntityProperty, v: any): any

Defined in packages/core/src/entity/EntityValidator.ts:95

Parameters:#

NameType
oDictionary
propEntityProperty
vany

Returns: any


validate#

validate<T>(entity: T, payload: any, meta: EntityMetadata): void

Defined in packages/core/src/entity/EntityValidator.ts:10

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
entityT
payloadany
metaEntityMetadata

Returns: void


validateCollection#

PrivatevalidateCollection<T>(entity: T, prop: EntityProperty): void

Defined in packages/core/src/entity/EntityValidator.ts:104

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
entityT
propEntityProperty

Returns: void


validateEmptyWhere#

validateEmptyWhere<T>(where: FilterQuery<T>): void

Defined in packages/core/src/entity/EntityValidator.ts:81

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
whereFilterQuery<T>

Returns: void


validateParams#

validateParams(params: any, type?: string, field?: string): void

Defined in packages/core/src/entity/EntityValidator.ts:57

Parameters:#

NameTypeDefault value
paramsany-
typestring"search condition"
field?string-

Returns: void


validatePrimaryKey#

validatePrimaryKey<T>(entity: EntityData<T>, meta: EntityMetadata): void

Defined in packages/core/src/entity/EntityValidator.ts:73

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
entityEntityData<T>
metaEntityMetadata

Returns: void


validateProperty#

validateProperty<T>(prop: EntityProperty, givenValue: any, entity: T): any

Defined in packages/core/src/entity/EntityValidator.ts:36

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
propEntityProperty
givenValueany
entityT

Returns: any

Last updated on by Renovate Bot