required property

  1. @Input()
bool required
getter/setter pair

Whether or not the input is required.

If there's no input text, a required input will show a validation error when it's first blurred.

Implementation

@Input()
bool required = false;