473,513 Members | 2,561 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bug in ValidatorConvert function in WebUIValidation.js


I'm currently developing under WinXP and have the latest .Net
distribution with Visual Studio 2k3.

While working on a company project, I came across this bug. I was
using a compareValidator: dataTypeCheck for a double. User input was
"-" (sans quotes).

When the user submitted, it runs the validation and PASSES even though
it should have failed. After some investigation, I realized this was
because the ValidatorConvert function was taking the "-" and turning it
into a zero.

Anybody know of any fixes for this; other then hijacking
ValidatorConvert and adding wrapper function to check for the case
above and handling accordingly?
Note: the bug also affects rangeValidator as well.

Nov 19 '05 #1
3 1649
Update; also has an issue with the "+" sign as well.

Nov 19 '05 #2
Frank..
If thats the case then the BEST bet is to write your own custom
validator..
Enjoy
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #3
the ValidatorConvert when it converts a number allows a leading sign (+
or -):

- is the same as -0 which is 0
+ is the same as +0 which is 0

there is no built in support for unsigned numbers, use the reg expression
validator instead.

-- bruce (sqlwork.com)


"Frank Rosario" <fr******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
|
| I'm currently developing under WinXP and have the latest .Net
| distribution with Visual Studio 2k3.
|
| While working on a company project, I came across this bug. I was
| using a compareValidator: dataTypeCheck for a double. User input was
| "-" (sans quotes).
|
| When the user submitted, it runs the validation and PASSES even though
| it should have failed. After some investigation, I realized this was
| because the ValidatorConvert function was taking the "-" and turning it
| into a zero.
|
| Anybody know of any fixes for this; other then hijacking
| ValidatorConvert and adding wrapper function to check for the case
| above and handling accordingly?
| Note: the bug also affects rangeValidator as well.
|
Nov 19 '05 #4

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

Similar topics

1
4713
by: J. Marcelo Barbieri | last post by:
a.. How to write server script to call a client side function written in JavaScript? a.. When using Validation controls, it uses a file named WebUIValidation.js. This file is sent to the client...
3
3543
by: Art Thomas | last post by:
We are using our own custom JavaScript validation as well as .Net validation. However, when we include our custom validation on a page, ..NET does not render/write the...
7
6572
by: Matthew Louden | last post by:
I created an ASP.NET web application. I added a TextBox and a RequiredFieldValidator control, and set the ControlToValidate property of RequiredFieldValidator control to be TextBox1. After I built...
4
1822
by: P. Jn-Charles | last post by:
Can someone help with this problem. It's all over the web. Here is the error when I tried to submit a webform. ------------------------------------------- This page uses an incorrect version of...
3
1527
by: 2stepme | last post by:
I am sorry to put this question up (because it has been asked and addressed many times) but I have searched and I been unable to solve my problem. I am running XP PRO Version 2002 SP2 on my...
4
4085
by: Ekkehard Preis | last post by:
Hi, I'm getting some strange error on one of my pages: The page is composed of some nested ascx controls, the error I am getting is 'undefined is null or not an object'. The error occurs in...
0
1472
by: dhnriverside | last post by:
Hi guys I've got a problem with one of my aspx pages using the script file WebUIValidation.js. Basically, I'm using the ValidatorEnable() function to enable/disable validation on a field...
0
1019
by: Quazzo | last post by:
Hello, I have found a small bug in WebUIValidation. In a page I use a CompareValidator to check that the user input date in correct format. When using Culture Latvian the date looks like:...
3
3039
by: =?Utf-8?B?c2lkZGhhdGg=?= | last post by:
Hi All, my asp.net applications is using validations controls and it throws 'undefined is null or not an object' error in WebUIValidation.js Error only happens on few machines if i move the same...
0
7259
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
7380
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
7535
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...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.