import {Injectable} from '@angular/core';


@Injectable()
export class FrameValidator {

  //字符和数字
  public static pattern_en_number = '^[A-Za-z0-9()]+$';

  //数字
  public static pattern_number = '^[0-9]+$';

  //手机号
  public static pattern_phone = /^1[0|1|2|3|4|5|6|7|8|9][0-9]\d{8}$/;
  // 邮件
  public static pattern_email = /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/;

  //邮政编码
  public static pattern_postcode = /^[0-9]{6}$/;

  //不包含特殊字符
  public static pattern_spec_char = '';

  //数字和小数
  public static pattern_number_double = '^(([0-9])|([1-9]([0-9]+)))(.[0-9]+)?$';
 
}