form-field/src/form-error/form-error.component.ts
<talenra-form-error> is used as a child element of <talenra-form-field> to display input validation errors.
Use multiple instances to provide accurate description of the errors.
Example :<talenra-form-field label="Email">
<input talenra-input formControlName="email" type="email" required />
<talenra-form-error [isVisible]="emailEmpty">This field is required.</talenra-form-error>
<talenra-form-error [isVisible]="emailInvalid">Email address is invalid.</talenra-form-error>
</talenra-form-field>import { FormErrorComponent } from '@talenra/components/form-field';| changeDetection | ChangeDetectionStrategy.OnPush |
| host | { |
| selector | talenra-form-error |
| styleUrls | ./form-error.component.scss |
| templateUrl | ./form-error.component.html |
Inputs |
Accessors |
| isVisible |
Type : boolean
|
|
The component's active state determines whether the error message is displayed to the user. Example : |
| isVisible | ||||||
getisVisible()
|
||||||
|
The component's active state determines whether the error message is displayed to the user. Example :
Returns :
boolean
|
||||||
setisVisible(value: boolean | undefined)
|
||||||
|
Set the component's active state.
Parameters :
Returns :
void
|