Jump to content

validar maskedbox


Recommended Posts

Function EmailAddressCheck(ByVal emailAddress As String) As Boolean

    ' Pattern ou mascara de verificação

    Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"

    ' Verifica se o email corresponde a pattern/mascara

    Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)

    ' Caso corresponda

    If emailAddressMatch.Success Then

        Return True


        Return False

    End If

End Function

tou com um problema, na linha "Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)"

o vb nao me reconhece regex.match

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.