473,386 Members | 1,720 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,386 software developers and data experts.

XML Validation error messages

When I run the XML Validation against a schema using the XMLValidatingReader
(.NET 1.1), the error messages that are produced are pretty generic.

If I have an element name "LastName", and the schema specifies that it can
only be 20 characters long, the Validator will create the error:

"The 'LastName' element has an invalid value according to its data type. An
error occurred at , (1, 148)."

(Because I'm building the Xml file in memory, then validating it, the line
number is always a 1.) The error message doesn't indicate what's wrong, just
that it has an invalid value. What validation rule did it break? Is the
value too long, too short? Was I trying to put alpha characters in a numeric
field? Is the value not in the specified enumerated list? It doesn't tell.
Just that it's an invalid value. I'm attempting to create messages for the
end user so they can fix what's wrong, but just saying that there's an error
doesn't help me. I would expect that the message should say something like:

"The 'LastName' element has an invalid value according to its data type. The
value 'SomeReallyLongLastNameThatWillFailTheEdit' is too long. The maximum
length for this field is 20 characters."

Am I missing something?

Thanks for any help.
Mar 3 '06 #1
0 1098

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

Similar topics

3
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the...
2
by: Ely | last post by:
When validating a control client side, is there a way to get the error message to display in the validation summary as soon as the control losses focus? Right now it only displays when the user...
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
2
by: ticars | last post by:
I have a telephone number user control in which I need to validate the data entered (Required field validation and regular expression validation). The phone number is represented as 3 text boxes...
2
by: FayeC | last post by:
Can anybody point me to a good tutorial/manual on advanced server-side form validation including validation of fields against unwanted strings such as the use of "http://". Thank you in advance,...
4
by: Gregc. | last post by:
Hi Would someone have a basic example of form validation that validates name and address, but using only one alert box that displays which fields haven't been completed? I can do it on an...
11
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
2
by: Gobind | last post by:
Hello I have been working on this for quite some time now, and have no clue why my app behaves the way it does. Here is the code snippet that controls this behaviour....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.