ValidationErrorMapBuilder
Defined in: error.ts:34
Builder for collecting validation errors
Key features:
- Collects errors for multiple keys
- Can invalidate the target object itself
Members
Section titled “Members”hasError
Section titled “hasError”
readonlyhasError:boolean
Defined in: error.ts:55
Whether the builder has any errors
invalidate()
Section titled “invalidate()”invalidate(
key,reason):void
Defined in: error.ts:44
Add an error for a key
Parameters
Section titled “Parameters”keyof T & string
Key to invalidate
reason
Section titled “reason”string | Error
Error message or Error object
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”Multiple reasons can be added for the same key.
invalidateSelf()
Section titled “invalidateSelf()”invalidateSelf(
reason):void
Defined in: error.ts:52
Invalidate the target object itself
Parameters
Section titled “Parameters”reason
Section titled “reason”string | Error
Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”This is useful with @nested.hoist to invalidate the parent object.