• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

30.0
/src/form/validator/confirm-validator.directive.ts
1
import { Directive, input } from '@angular/core';
2
import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn } from '@angular/forms';
3

4
export function confirmValidator(value: string): ValidatorFn {
5
    return (control: AbstractControl): { [key: string]: any } | null => {
UNCOV
6
        const isEqual = value === control.value;
×
UNCOV
7
        return !isEqual ? { confirm: { value: value, actual: control.value } } : null;
×
UNCOV
8
    };
×
9
}
10

11
/**
12
 * confirm validator,用于确认两次输入是否一致
13
 * @name confirm
14
 * @order 25
15
 */
16
@Directive({
1✔
17
    // eslint-disable-next-line @angular-eslint/directive-selector
18
    selector: '[confirm]',
×
19
    providers: [{ provide: NG_VALIDATORS, useExisting: ThyConfirmValidatorDirective, multi: true }]
20
})
21
export class ThyConfirmValidatorDirective implements Validator {
×
22
    /**
23
     * 表单控件的校验值
1✔
24
     */
25
    readonly confirm = input<string>(undefined);
26

27
    validate(control: AbstractControl) {
1✔
28
        return confirmValidator(this.confirm())(control);
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc