Não está passando pelo validador no submit - PasswordValidator - Resolvido

private createGroupForm() {
    this.medicalProfileForm = this.formBuilder.group(
      {
        email: new FormControl('', [Validators.required, Validators.email]),
        sex: new FormControl('', [Validators.required]),
        name: new FormControl('', [Validators.required]),
        country: new FormControl('', [Validators.required]),
        surname: new FormControl('', [Validators.required]),
        hospital: new FormControl('', [Validators.required]),
        telephone: new FormControl('', [Validators.required]),
        cellPhone: new FormControl('', [Validators.required]),
        password: new FormControl('', [
          Validators.required,
          Validators.minLength(8),
          Validators.maxLength(12),
          PasswordValidator()
        ]),
        speciality: new FormControl('', [Validators.required]),
        confirmPassword: ['', Validators.required],
        birth: new FormControl('', [Validators.required]),
      }
    );
  }

PasswordValidator

import { AbstractControl, ValidatorFn } from '@angular/forms';

export function PasswordValidator(): ValidatorFn {
  return (control: AbstractControl): { [key: string]: any } | null => {
    const ucase = new RegExp("[A-Z]+");
    const lcase = new RegExp("[a-z]+");
    const num = new RegExp("[0-9]+");
    const esp = new RegExp("(?=.*[}{,.^?~=+\\-_\\/*\\-+.\\|])");
    const a = ucase.test(control.value);
   console.log("Senha: " + control.value + " - Tem maiusculo: " + a);
    const b = lcase.test(control.value);
    console.log("Senha: " + control.value + " - Tem minusculo: " + b);
    const c = num.test(control.value);
    console.log("Senha: " + control.value + " - Tem número: " + c);
    const d = esp.test(control.value);
    console.log("Senha: " + control.value + " - Tem esp: " + d);
    const forbidden = ucase.test(control.value) || lcase.test(control.value) || num.test(control.value);
    console.log("Senha: " + control.value + " - válido: " + forbidden);
    return forbidden ?
        { 'password':
          { value: control.value }
    } : null;
  }
}

Mas o mesmo o campo password, ficando em vermelho, eu consigo dar o submit.

O que pode ser ?

Resolvido

this.medicalProfileForm = this.formBuilder.group(
      {
        email: new FormControl('', [Validators.required, Validators.email]),
        sex: new FormControl('', [Validators.required]),
        name: new FormControl('', [Validators.required]),
        country: new FormControl('', [Validators.required]),
        surname: new FormControl('', [Validators.required]),
        hospital: new FormControl('', [Validators.required]),
        telephone: new FormControl('', [Validators.required]),
        cellPhone: new FormControl('', [Validators.required]),
        password: new FormControl('',
          Validators.compose([
            Validators.required,
            Validators.minLength(8),
            Validators.maxLength(12),
            PasswordValidator.Validator
          ])
        ),
        speciality: new FormControl('', [Validators.required]),
        confirmPassword: ['', Validators.required],
        birth: new FormControl('', [Validators.required]),
      }

validador

import { AbstractControl } from '@angular/forms';

export class PasswordValidator {
  static Validator(controle: AbstractControl) {
    const password = controle.value;
    const ucase = new RegExp("[A-Z]+");
    const lcase = new RegExp("[a-z]+");
    const num = new RegExp("[0-9]+");
    const esp = new RegExp("(?=.*[%@!#¨&}{,.^?~=+\\'\\´\\`\\<\\>\\=\\(\\)\\[\\]\\-_\\/*\\-+.\\|])");
    const itsValid = (ucase.test(password) && lcase.test(password)
      && num.test(password) && esp.test(password));
    console.log("Senha: " + password + " - válido: " + itsValid);
    if (itsValid) {
      return null;
    }
    return { passwordInvalido: true };
  }
}