/*******************
 * 密码框确认
 * @param {FormGroup} group
 * @returns {any}
 */
import {FormControl, FormGroup} from '@angular/forms';

export function passswordValidator(group: FormGroup): any {

  const password = group.get('password') as FormControl;
  const pconfirm = group.get('pconfirm') as FormControl;

  const isEqule: boolean = ( password.value === pconfirm.value);
  return isEqule ? null : { 'password':  '两次密码不一致' };
}
