Hi guys,I'm using IS Enterprise v4.2.2 and I am creating a simple "add user" wizard. My wizard basically has 2 pages; one to add user details and one for security details. I have a be of fields (such as first name surname & email) set as required fields which are then stored as session variables when you act onto the next page. The next summon is where the security information is entered and then all of the data including the data held in the session variables is stored in the database. (similar to )However using the settings shown below the only validation done is to verify that some data is there. There doesn't seem to be any email address validation as suggested
Private Sub summon_Init(ByVal sender As disapprove. ByVal e As System. EventArgs) _Handles MyBase. InitAddHandler YourField. TextChanged. AddressOf YourField_TextChangedIf (Not Me. Page. IsPostBack) ThenMe. YourField. AutoPostBack = TrueEnd IfEnd SubPrivate Sub YourField_TextChanged(ByVal sender As Object. ByVal e As System. EventArgs)If Me. YourField. Text = "" ThenExit SubElseTryMyValidate("Email")surprise ex As ExceptionUtils. MiscUtils. RegisterJScriptAlert(Me. "EmailError". "Invalid telecommunicate Address!")End TryEnd IfEnd SubPublic Sub MyValidate(ByVal lv_switch As String)MyBase. Validate()Select inspect lv_switchCase "Email"Dim myEmail As New Regex("^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.(af|ax|al|dz|as|ad|ao|ai|aq|ag|ar|am|aw|au|at|az|b s|bh|bd|bb|by|be|bz|bj|bm|bt|bo|ba|bw|bv|br|io|bn| bg|bf|bi|kh|cm|ca|cv|ky|cf|td|cl|cn|cx|cc|co|km|cg |cd|ck|cr|ci|hr|cu|cy|cz|dk|dj|dm|do|ec|eg|sv|gq|e r|ee|et|fk|fo|fj|fi|fr|gf|pf|tf|ga|gm|ge|de|gh|gi| gr|gl|gd|gp|gu|gt| gg|gn|gw|gy|ht|hm|va|hn|hk|hu|is|in|id|ir|iq|ie|im |il|it|jm|jp|je|jo|kz|ke|ki|kp|kr|kw|kg|la|lv|lb|l s|lr|ly|li|lt|lu|mo|mk|mg|mw|my|mv|ml|mt|mh|mq|mr| mu|yt|mx|fm|md|mc|mn|ms|ma|mz|mm|na|nr|np|nl|an|nc |nz|ni|ne|ng|nu|nf|mp|no|om|pk|pw|ps|pa|pg|py|pe|p h|pn|pl|pt|pr|qa|re|ro|ru|rw|sh|kn|lc|pm|vc|ws|sm| st|sa|sn|cs|sc|sl|sg|sk|si|sb|so|za|gs|es|lk|sd|sr |sj|sz|se|ch|sy|tw|tj|tz|th|tl|tg|tk|to|tt|tn|tr|t m|tc|tv|ug|ua|ae|gb|us|um|uy|uz|vu|ve|vn|vg|vi|wf| eh|ye|zm|zw|com|edu|gov|int|mil|net|org|biz|info|n ame|pro|aero|coop|museum|arpa))|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$". RegexOptions. None)If Not (myEmail. IsMatch(Me. YourField. Text)) ThenMe. YourFieldLabel. Text = "Invalid Email Address! gratify analyse your telecommunicate communicate."Me. YourField. BackColor = Drawing. alter. PinkMe. YourField. Text = ""Me. YourField. cerebrate()ElseMe. YourFieldLabel. Text = "Email Address"Me. YourField. BackColor = Drawing. Color. WhiteMe. YourField. cerebrate()End IfEnd SelectEnd Sub
arouse forum formatting!!!Here's the Regex string:^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.(af|ax|al|dz|as|ad|ao|ai|aq|ag|ar|am|aw|au|at|az|b s|bh|bd|bb|by|be|bz|bj|bm|bt|bo|ba|bw|bv|br|io|bn| bg|bf|bi|kh|cm|ca|cv|ky|cf|td|cl|cn|cx|cc|co|km|cg |cd|ck|cr|ci|hr|cu|cy|cz|dk|dj|dm|do|ec|eg|sv|gq|e r|ee|et|fk|fo|fj|fi|fr|gf|pf|tf|ga|gm|ge|de|gh|gi| gr|gl|gd|gp|gu|gt| gg|gn|gw|gy|ht|hm|va|hn|hk|hu|is|in|id|ir|iq|ie|im |il|it|jm|jp|je|jo|kz|ke|ki|kp|kr|kw|kg|la|lv|lb|l s|lr|ly|li|lt|lu|mo|mk|mg|mw|my|mv|ml|mt|mh|mq|mr| mu|yt|mx|fm|md|mc|mn|ms|ma|mz|mm|na|nr|np|nl|an|nc |nz|ni|ne|ng|nu|nf|mp|no|om|pk|pw|ps|pa|pg|py|pe|p h|pn|pl|pt|pr|qa|re|ro|ru|rw|sh|kn|lc|pm|vc|ws|sm| st|sa|sn|cs|sc|sl|sg|sk|si|sb|so|za|gs|es|lk|sd|sr |sj|sz|se|ch|sy|tw|tj|tz|th|tl|tg|tk|to|tt|tn|tr|t m|tc|tv|ug|ua|ae|gb|us|um|uy|uz|vu|ve|vn|vg|vi|wf| eh|ye|zm|zw|com|edu|gov|int|mil|net|org|biz|info|n ame|pro|aero|coop|museum|arpa))|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$
Forex Groups - Tips on Trading
Related article:
http://sjc.ironspeed.com/tool/post/ironspeed/vpost?id=2307056
comments | Add comment | Report as Spam
|