public/admin/main.js
/**
 *    Returns validations array to check that given values must match to each other
 *
 *    @class MustMatch
 */
Returns validations array to check that given values must match to each other
@class MustMatch
Returns validations array to check that given values must match to each other @class MustMatch
function MustMatch(controlName, matchingControlName) {
    return function (formGroup) {
        var control = formGroup.controls[controlName];
        var matchingControl = formGroup.controls[matchingControlName];
        if (matchingControl.errors && !matchingControl.errors.mustMatch) {
            return;
        }
        if (control.value !== matchingControl.value) {
            matchingControl.setErrors({ mustMatch: true });
        }
        else {
            matchingControl.setErrors(null);
        }
    };
}
function MustMatch ( controlName , matchingControlName ) { return function ( formGroup ) { var control = formGroup . controls [ controlName ] ; var matchingControl = formGroup . controls [ matchingControlName ] ; if ( matchingControl . errors && ! matchingControl . errors . mustMatch ) { return ; } if ( control . value !== matchingControl . value ) { matchingControl . setErrors ( { mustMatch : true } ) ; } else { matchingControl . setErrors ( null ) ; } } ; }
Returns validations array to check that given values must match to each other
    @class MustMatch
Returns validations array to check that given values must match to each other @class MustMatch