473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CustomValidator doesn't validate on a textbox that is empty

Ned
I am trying to use a CustomValidator on a textbox. The Validator uses
a client-side funtion but it doesn't run if the textbox is empty. If
there is data in the text box it runs fine. Any suggestions
appreciated. Thanks!
Nov 18 '05 #1
2 1629
Required Field Validator?

Also, are you saying it doesn't run or it passes validation?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Ned" <ne***********@earthlink.net> wrote in message
news:1c*************************@posting.google.co m...
I am trying to use a CustomValidator on a textbox. The Validator uses
a client-side funtion but it doesn't run if the textbox is empty. If
there is data in the text box it runs fine. Any suggestions
appreciated. Thanks!

Nov 18 '05 #2
If you wish to validate the fact that it is empty you need to use a required
field validator.

Regards

"Ned" <ne***********@earthlink.net> wrote in message
news:1c*************************@posting.google.co m...
I am trying to use a CustomValidator on a textbox. The Validator uses
a client-side funtion but it doesn't run if the textbox is empty. If
there is data in the text box it runs fine. Any suggestions
appreciated. Thanks!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave | last post by:
I have added a custom validator to the EditItemTemplate of a DataGrid as follows: <EditItemTemplate> <asp:TextBox id=txtWorkDate CssClass="ResultsDim" runat="server" Width="100%" Text='<%#...
10
by: Mr. x | last post by:
Hello, I have some code as follows. It seems that customValidator doesn't work - because i don't get any message. In the body : <asp:table> <asp:TableRow>
2
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple text box and button that did a Full-text Search of a...
1
by: Tom | last post by:
Hi I need to validate the duplication of username. Here is the aspx code [code <td>User Name:</td><td><asp:textbox id="username" Runat="server"></asp:textbox><asp:requiredfieldvalidator...
3
by: philipl | last post by:
hi, i have a textbox in my edititemtemplate in my datagrid. I have created a customvalidator for it, when i update the row the appropiate function gets called to customvalidate but the problem...
3
by: RSB | last post by:
Hi Everyone, I have this TextBox with the TextMode="MultiLine". so now it does not validate the text in the TextBox for the MaxLength SO i have decided to execute a CustomValidator for this...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
I would like to validate a field but with an "If" statement to check whether that field should be mandatory or optional based on the option that the user has selected from a dropdownlist. I used...
0
by: antonyliu2002 | last post by:
The full code is pasted below. It looks scarily long, but it's pretty simple. It is adapted from a sample code at MSDN. If you run it, and check it out from your browser, you'll see: ...
1
by: cemcat | last post by:
Hello, We have an ASP.NET 2.0 (C#) web form that contains a textbox for users to enter multiple e-mail addresses separated by semicolons. We need to validate that each individual e-mail address...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.