Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Regular Expressions
This is the forum to discuss the Wrox book Beginning Regular Expressions by Andrew Watt; ISBN: 9780764574894
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Regular Expressions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 24th, 2007, 06:02 AM
Registered User
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Validate NULL

i have to validate my pages for which i am using RegularExpressions to validate the user input.

My question is: How do i validate a null value? That is, when a user is not entering any value in any of the input fields.

Note: I dont want to use required="true" for that input field nor i want to use javascript for validation.
I want to use regular expression to validate null.

Please give your suggestions,

[u]Thanks in advance,</u>

  #2 (permalink)  
Old August 24th, 2007, 06:49 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Your Regular Expression should be setup to handle whitespace, not NULL (There is a difference between an empty string and NULL). Regular Expression are used to pattern match and since NULL is state you can't write an expression to validate something that doesn't exist.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Not Null constraint to Null Columns arasu Oracle 1 August 22nd, 2005 10:09 AM
How to validate a node in C++ ThunderBird XML 2 August 27th, 2004 11:22 AM
validate data hosefo81 PHP How-To 2 April 30th, 2004 05:30 AM
Validate Event tbriers Pro VB 6 1 April 2nd, 2004 08:57 PM
Validate chekc Raul Javascript 4 February 9th, 2004 07:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.