MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / validateEntity

Function validateEntity

packages/core/src/entity/validators.ts:43–47  ·  view source on GitHub ↗
(entity: T, meta: EntityMetadata<T>)

Source from the content-addressed store, hash-verified

41
42/** @internal */
43export function validateEntity<T extends object>(entity: T, meta: EntityMetadata<T>): void {
44 for (const prop of meta.validateProps) {
45 validateProperty(prop, getValue(entity, prop), entity);
46 }
47}
48
49/** @internal */
50export function validateParams(params: any, type = 'search condition', field?: string): void {

Callers 1

computeChangeSetMethod · 0.85

Calls 2

validatePropertyFunction · 0.85
getValueFunction · 0.85

Tested by

no test coverage detected