Validating a text field

@Hristo: I'm glad you found a solution that suits. Yes, it visually solves the problem, while your suggestion is just pointing (yes, still in the right direction), but I wouldn't call it solution.

Executes Java Script whenever a user moves with the mouse the focus away from an element within a form.

In other words, whenever a person first clicks an element, and then clicks anywhere outside of it. Onblur is used when you want to check each element (ie: text, textarea boxes ) individually, and ask the user to correct the input before moving on to the next box.

The other event, onsubmit, validates the form at the end, as the user presses the submit button.

A name doesn't generally contain weird symbols, and definitely not numbers. This can be from the mouse clicking inside another field, or a Tab key being pressed to navigate to the next input control. ") Else Email Valid = True 'Email is Perfect End If Else 'Not A Match To Pattern Email Valid = False 'Set Boolean Variable To False Message Box. I hope you have learned from this article and that you have enjoyed it as much as I did.

That may seem like Captain Obvious speaking, but you'll be amazed at some of the data that gets entered into a name field. I then created an If statement to determine how the input data was formatted and whether or not the data is only alphabetic.

Visual studio have build in support for this ( and you may also achieve it via coding ) .

» Validate e-mail address There is no way to be 100% sure an e-mail address is actually working unless you send an e-mail there.Right click on the compare validator and choose properties , now locate Error Message and write "Alert : Type only Number" . In the Operator choose Data Type Check and in the Type choose Integer. I would like to have a text input field containing the "$" sign in the very beginning, and no matter what editing occurs to the field, for the sign to be persistent.XML has been designed for ease of implementation and for interoperability with both SGML and HTML.This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at

Leave a Reply