最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

asp form 表單驗(yàn)證函數(shù)

 更新時間:2009年01月13日 12:13:53   作者:  
比較不錯一些表單驗(yàn)證函數(shù),大家可以參考下
'*************************************
'檢測是否只包含英文和數(shù)字
'*************************************

Function IsvalidValue(ArrayN, Str)
IsvalidValue = False
Dim GName
For Each GName in ArrayN
If Str = GName Then
IsvalidValue = True
Exit For
End If
Next
End Function

'*************************************
'檢測是否有效的數(shù)字
'*************************************

Function IsInteger(Para)
IsInteger = False
If Not (IsNull(Para) Or Trim(Para) = "" Or Not IsNumeric(Para)) Then
IsInteger = True
End If
End Function

'*************************************
'用戶名檢測
'*************************************

Function IsValidUserName(byVal UserName)
Dim i, c
Dim VUserName
IsValidUserName = True
For i = 1 To Len(UserName)
c = LCase(Mid(UserName, i, 1))
If InStr("$!<>?#^%@~`&*();:+='""     ", c) > 0 Then
IsValidUserName = False
Exit Function
End If
Next
For Each VUserName in Register_UserName
If UserName = VUserName Then
IsValidUserName = False
Exit For
End If
Next
End Function

'*************************************
'檢測是否有效的E-mail地址
'*************************************

Function IsValidEmail(Email)
Dim names, Name, i, c
IsValidEmail = True
Names = Split(email, "@")
If UBound(names) <> 1 Then
IsValidEmail = False
Exit Function
End If
For Each Name IN names
If Len(Name) <= 0 Then
IsValidEmail = False
Exit Function
End If
For i = 1 To Len(Name)
c = LCase(Mid(Name, i, 1))
If InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 And Not IsNumeric(c) Then
IsValidEmail = False
Exit Function
End If
Next
If Left(Name, 1) = "." Or Right(Name, 1) = "." Then
IsValidEmail = False
Exit Function
End If
Next
If InStr(names(1), ".") <= 0 Then
IsValidEmail = False
Exit Function
End If
i = Len(names(1)) - InStrRev(names(1), ".")
If i <> 2 And i <> 3 Then
IsValidEmail = False
Exit Function
End If
If InStr(email, "..") > 0 Then
IsValidEmail = False
End If
End Function

相關(guān)文章

最新評論

朝阳区| 磐安县| 林西县| 阜康市| 汾西县| 高邮市| 松潘县| 扎兰屯市| 乌拉特前旗| 驻马店市| 邓州市| 余干县| 广南县| 廉江市| 花垣县| 濮阳市| 巴彦淖尔市| 承德市| 夏河县| 鄂州市| 临汾市| 盐源县| 烟台市| 香港| 汕尾市| 汾西县| 马尔康县| 泉州市| 社会| 黄梅县| 临泽县| 巴塘县| 政和县| 苗栗市| 广东省| 霸州市| 梓潼县| 文成县| 镇远县| 宣城市| 隆子县|