### File

`src/validation-message/validation-message.component.ts`

### Metadata

selector | `rb-validation-message`
template |
    <ul class="rb-validation-message" *ngIf="submitted || control.touched">
      <li *ngFor="let validation of validations" [hidden]="!control.hasError(validation.type)">
        {{ validation.message }}
      </li>
    </ul>

### Index

###### Inputs
control submitted validations

### Inputs

`control` | Type: `AbstractControl`
Defined in src/validation-message/validation-message.component.ts:18

`submitted` | Type: `boolean` Default value: `false`
Defined in src/validation-message/validation-message.component.ts:19

`validations` | Type: `Validation[]`
Defined in src/validation-message/validation-message.component.ts:20

    import { Component, Input } from '@angular/core';
    import { FormControl, AbstractControl } from '@angular/forms';

    import { Validation } from '../validation';

    @Component({
      selector: 'rb-validation-message',
      template: `
        <ul class="rb-validation-message" *ngIf="submitted || control.touched">
          <li *ngFor="let validation of validations" [hidden]="!control.hasError(validation.type)">
            {{ validation.message }}
          </li>
        </ul>
      `,
    })
    export class ValidationMessageComponent {

      @Input() public control: AbstractControl = new FormControl();
      @Input() public submitted: boolean = false;
      @Input() public validations: Validation[] = [];
    }

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""