ValidatorHelper Class

HD.Common

ValidatorHelper Class Helper帮助文档
各种验证帮助类
Inheritance Hierarchy

SystemObject  HD.CommonValidatorHelper

Namespace: HD.Common
Assembly: HD.Common (in HD.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public class ValidatorHelper
Public Class ValidatorHelper
public ref class ValidatorHelper
type ValidatorHelper =  class end

The ValidatorHelper type exposes the following members.

Constructors

  NameDescription
Public methodValidatorHelper
Initializes a new instance of the ValidatorHelper class
Top
Methods

  NameDescription
Public methodStatic membercheckUserId
验证用户名:必须以字母开头,可以包含字母、数字、“_”、“.”,至少5个字符
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberhasChinese
Public methodStatic memberHasEmail
Public methodStatic memberHasIP
Public methodStatic memberHasMobile
Public methodStatic memberHasUrl
Public methodStatic memberIsChinese
中文
Public methodStatic memberIsDate
Public methodStatic memberIsDateTime
验证日期
Public methodStatic memberIsDecimal
是否为数字型
Public methodStatic memberIsEmail
验证邮箱
Public methodStatic memberIsHanyu
验证是否包含汉语
Public methodStatic memberIsHanyuAll
验证是否全部汉语
Public methodStatic memberIsIDCard
验证身份证是否有效
Public methodStatic memberIsIDCard15
Public methodStatic memberIsIDCard18
Public methodStatic memberIsInt
是不是Int型的
Public methodStatic memberIsIp
Public methodStatic memberIsIP
验证IP
Public methodStatic memberIsLengthStr
看字符串的长度是不是在限定数之间 一个中文为两个字符
Public methodStatic memberIsMobile
验证手机号
Public methodStatic memberIsNormalChar
验证是不是正常字符 字母,数字,下划线的组合
Public methodStatic memberIsNumber
判断字符串是否为数字
Public methodStatic memberIsPostCode
邮政编码 6个数字
Public methodStatic memberIsTel
是不是中国电话,格式010-85849685
Public methodStatic memberIsUrl
验证网址
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
See Also

Reference