From 48ffc696315c30250f2466ff4e27f1f1acd4751b Mon Sep 17 00:00:00 2001
From: ThomasBidot <77505438+ThomasBidot@users.noreply.github.com>
Date: Tue, 7 Dec 2021 16:17:13 +0100
Subject: [PATCH] Back to no email verification

---
 src/app/signup/core/customValidationModule.ts | 45 -------------------
 1 file changed, 45 deletions(-)
 delete mode 100644 src/app/signup/core/customValidationModule.ts

diff --git a/src/app/signup/core/customValidationModule.ts b/src/app/signup/core/customValidationModule.ts
deleted file mode 100644
index 88be80e..0000000
--- a/src/app/signup/core/customValidationModule.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { FormGroup, FormControl, FormGroupDirective, NgForm, ValidatorFn } from '@angular/forms';
-import { ErrorStateMatcher } from '@angular/material';
-
-//from https://obsessiveprogrammer.com/validating-confirmation-fields-in-angular-reactive-forms-with-angular-material/
-
-/**
- * Custom validator functions for reactive form validation
- */
-export class CustomValidators {
-    /**
-     * Validates that child controls in the form group are equal
-     */
-    static childrenEqual: ValidatorFn = (formGroup: FormGroup) => {
-        const [firstControlName, ...otherControlNames] = Object.keys(formGroup.controls || {});
-        const isValid = otherControlNames.every(controlName => formGroup.get(controlName).value === formGroup.get(firstControlName).value);
-        return isValid ? null : { childrenNotEqual: true };
-    }
-}
-
-/**
- * Custom ErrorStateMatcher which returns true (error exists) when the parent form group is invalid and the control has been touched
- */
-export class ConfirmValidParentMatcher implements ErrorStateMatcher {
-    isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
-        return control.parent.invalid && control.touched;
-    }
-}
-
-/**
-* Collection of reusable RegExps
-*/
-// export const regExps: { [key: string]: RegExp } = {
-//     password: /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{7,15}$/
-// };
-
-/**
- * Collection of reusable error messages
- */
-export const errorMessages: { [key: string]: string } = {
-    fullName: 'Full name must be between 1 and 128 characters',
-    email: 'La forme de l\'adresse email doit être valide (username@domain)',
-    confirmEmail: 'Les adresses email doivent être identiques',
-    // password: 'Password must be between 7 and 15 characters, and contain at least one number and special character',
-    confirmPassword: 'Les mots de passe doivent être identiques'
-};
\ No newline at end of file
-- 
GitLab