javascript - ASP.Net RegularExpression Validator - Parsing bug -


Using ASP.NET RigXP Vedic, I want to write a regular expression which ensures that the field has only numerical and decimal values, and at least one letter

  ^ [0- 9] {1,40} (\ [0- 9] {1,2})? $  

Originally: [0- 9] {1,40} - Meaning of at least one to 40 numeric characters.

ASP.Net does not have a fire for the regexp validator, an empty area - where there is at least one letter.

Actions-around: Using the custom validator in javascript with regexp check:

validate the function (sender, args) {var error = true; Var txtMinTrans = document.getElementById ('TxtMinTrans'); Var regexp = new RegExp ("^ [0- 9] {1,40} (\ [0- 9] {1,2})" $ "); if (txtMinTrans.value.match (regexp)) {Warning ( "Good");} and {warning ("bad");} if (error) args.IsValid = false; Else args.IsValid = true;}

Code> txtMinTrans.length == 0 .

There is no need to check if someone else has experienced this.

Regx verifier will not actually run unless there is no value in the field. However, you can also point to the same text box control. Es, so both will handle its responsibilities against it - empty and patterns.


Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -