* Validates this construct. * * Invokes the `validate()` method on all validations added through * `addValidation()`. * * @returns an array of validation error messages associated with this * construct.
()
| 468 | * construct. |
| 469 | */ |
| 470 | public validate(): string[] { |
| 471 | return (this._validations ?? []).flatMap(v => v.validate()); |
| 472 | } |
| 473 | |
| 474 | /** |
| 475 | * Locks this construct from allowing more children to be added. After this |