Skip to content

Commit 1dee6c3

Browse files
authored
Update ip-universal.directive.ts
1 parent cb7dd2a commit 1dee6c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

projects/multidirectory-app/src/app/core/validators/ip-universal.directive.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export class UniversalIpValidatorDirective implements Validator {
2121

2222
validate(control: AbstractControl): ValidationErrors | null {
2323
const value = control.value;
24+
25+
if (!value) {
26+
return null;
27+
}
2428
// возможно, передан список IP через запятую
2529
const extractedIps: string[] = value.replace(/\s/g, '').split(',');
2630

0 commit comments

Comments
 (0)