breeze-client / ValidationMessageContext
Interface: ValidationMessageContext
Defined in: src/validation/validate.ts:29
Used by Validator to compose messages
Extends
Indexable
[
key:string]:any
Properties
displayName?
optionaldisplayName?:string
Defined in: src/validation/validate.ts:33
The name to show for the property in messages, as %displayName%. When it is not set, Breeze uses the property's displayName, or else propertyName, or "Value" when there is no property.
entity?
optionalentity?:Entity
Defined in: src/validation/validate.ts:19
The entity whose property is being validated. Set when Breeze validates a property of an entity; an entity-level validator gets the entity as its value instead.
Inherited from
isAsync?
optionalisAsync?:boolean
Defined in: src/validation/validate.ts:40
Marks the validator as async when its function returns a promise without being declared async, which Breeze cannot see. An async function needs no marking. See Validator.isAsync.
message?
optionalmessage?:string| ((vc) =>string)
Defined in: src/validation/validate.ts:37
A message to use instead of messageTemplate: a string, or a function that returns one from the context.
messageTemplate?
optionalmessageTemplate?:string
Defined in: src/validation/validate.ts:35
The error message template. Each %token% is replaced with the context property of that name, calling it with the context if it is a function. Defaults to the entry for the validator's name in Validator.messageTemplates.
name?
optionalname?:string
Defined in: src/validation/validate.ts:31
The name of the validator. Set by the Validator constructor.
property?
optionalproperty?:DataProperty|NavigationProperty
Defined in: src/validation/validate.ts:21
The DataProperty or NavigationProperty being validated. Set when Breeze validates a property.
Inherited from
propertyName?
optionalpropertyName?:string
Defined in: src/validation/validate.ts:23
The name of the property being validated: a property path, such as address.city, for a property of a complex object.
Inherited from
ValidationContext.propertyName
signal?
optionalsignal?:AbortSignal
Defined in: src/validation/validate.ts:43
For an async validator, aborted when its result will no longer be used - another run of the same check started, or the entity was detached. Pass it on to fetch to cancel the request.
value?
optionalvalue?:any
Defined in: src/validation/validate.ts:25
The value that failed validation, so that a message template can show it as %value%. Set by Validator.validate when validation fails.