source: trip-planner-front/node_modules/@angular/material/esm2015/checkbox/checkbox-required-validator.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { Directive, forwardRef, } from '@angular/core';
9import { CheckboxRequiredValidator, NG_VALIDATORS, } from '@angular/forms';
10export const MAT_CHECKBOX_REQUIRED_VALIDATOR = {
11 provide: NG_VALIDATORS,
12 useExisting: forwardRef(() => MatCheckboxRequiredValidator),
13 multi: true
14};
15/**
16 * Validator for Material checkbox's required attribute in template-driven checkbox.
17 * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not
18 * work with `mat-checkbox`.
19 */
20export class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {
21}
22MatCheckboxRequiredValidator.decorators = [
23 { type: Directive, args: [{
24 selector: `mat-checkbox[required][formControlName],
25 mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,
26 providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],
27 },] }
28];
29//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3gtcmVxdWlyZWQtdmFsaWRhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL2NoZWNrYm94L2NoZWNrYm94LXJlcXVpcmVkLXZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQ0wsU0FBUyxFQUNULFVBQVUsR0FFWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQ0wseUJBQXlCLEVBQ3pCLGFBQWEsR0FDZCxNQUFNLGdCQUFnQix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