Simple setup: Shopping Cart in the form of a data list.
Header has two buttons: Update Quantities and Remove Selected Items
Each DataList Item has (among other things) a textbox with the id="txtQty" that stores the quantity of the shopping cart item.
The user should be able to change the values in these textboxes and then hit the Upd...
Does the single responsibility principle mean that your validation rules should be external to the entity?
If so do you use one class per validation rule?
...
This should be an easy one.
I have a table like so:
<table>
<tr>
<td></td><td></td><td></td><td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
My firefox 3 validator says this is acceptable code. It just seems wrong to me, are there any possible issues leaving the table rows uneven like this? It works in IE7 too.
...
Having a problem where the form submits before the validateUsername function has a chance to complete the username check on the server-side.
How do I submit the form only after the validateUsername function completes?
Hope this is clear...
form.submit(function(){
if (validateUsername() & validateEmail() & validatePassword()) {
retur...
Hi there,
I'm developing a SL3 application with Prism. I need to have support for validation (both field level (on the setter of the bound property) and before save (form level)), including a validation summary, shown when the save button is pressed.
But the samples I can find googling are either SL3 with a lot of code in code behind (...
Hello everyone,
Suppose I have a byte stream (array), and I want to write code (using .Net C#) to validate whether it is valid UTF-8 byte sequence or not. I want to write code from scratch because I need to report the exact location where there is invalid byte sequences and may even remove invalid bytes -- not just want to get yes or no...
Im getting a validation error when a user enters a Foreign name. An example is:
System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$pageContent$txtName="Pedro ú logo").
where the ú is being translated as & # 250 ; (without the spaces of course)
These foreign charac...
In the NerdDinner tutorial, Step 5, mid way down under Complete Edit Action Method Implementations there is a paragraph:
The nice thing about our Edit implementation is that neither our Controller class nor our View template has to know anything about the specific validation or business rules being enforced by our Dinner model. We can...
If I have a large (>500MB) XML file to validate, does an XmlReader bring the whole thing into memory to perform validation?
I looked at http://stackoverflow.com/questions/751511/validating-an-xml-against-referenced-xsd-in-c for validation procedure.
thanks,
Mark
...
Does anybody have any links or advice on how to hook up validation that requires interacting with the database before updating or adding to the database? Every example I see shows how to validate properties e.g. "Is Required", "Is Email", "Is Numeric", etc, but how do you hook up validation for "Can't order out of stock item"? This xVal ...
Hello everyone,
I have an input file and it is very big (about 120M), and I do not want to load it into memory at once. My purpose is to check whether this file is using valid UTF-8 encoding encoded file. Any ideas to have a quick check without reading all file content into memory in the form of byte[]? Simple sample code appreciated.
...
We have an ASP.NET web forms application which occasionally generates a validation error like below.
What can be the reason for this?
A validation error has occurred.
Exception type: System.Web.HttpRequestValidationException
Exception message: A potentially dangerous Request.QueryString value
was detected from the client
(_T...
Hi,
I require a SQL script to validate a VARCHAR field in a table in a SQL Server 2005 database that contains DateTime values, in the format DD/MM/YYYY, or NULL values. I would like to identify all invalid dates. Can anyone suggest a method?
UPDATE
The answer has to make use of T-SQL; for performance reasons, I can't make use of SQ...
Good Day,
We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1.
We have a page that contains a couple of textboxes with their respective Validators.
On .NET 1.1, when a textbox contains an INVALID value, clicking on the "submit" button, will not produce a postback (E.G. Nothing will happen).
However, when we migrated ...
On the NerdDinner example of Professional ASP.NET MVC 1.0 there's a method to create a new dinner as copied bellow (page 89 of the free NerdDinner version).
There it checks ModelState.IsValid for true. It seems to check if the model is valid for the database (that is, it catches data type conversions, like dates with invalid format, but...
On the NerdDinner example a set of business rules are written to validate the data on a model. Things like empty strings are checked for and by calling modelObject.GetRuleViolations() you can get them all. But there's another layer of validation which is the database. For example, the datetime field is left for validation to the database...
On my site I'm using the jquery cycle plugin for a slideshow with a pager.
This example:
http://malsup.com/jquery/cycle/pager.html
So in the head of my document, I have a script similar to:
<script type="text/javascript">
$('#s4').before('<div id="nav">').cycle({
fx: 'turnDown',
speed: 'fast',
timeout: 3000,
p...
Hello!
We are using a RegEx Validator to validate an input from a textbox.
The current RegEx expression checks if the current number is between the range of 1 - 999.
We just inherited this code and we need to change the range from 999 to just 365. In short, we need to write a regex to check if the input is between 1 - 365.
Of course,...
Hello,
Scenario: I am trying to insert a team (composed by multiple persons) on a single page. I have a web user control to insert each person, and when a team has multiple persons several Web User Controls are displayed at the same time.
Each user has a ValidationSummary and several validators (All grouped to the same validation group...
I am getting an Out of Memory exception sometimes during or after the validation of component happens. I was trying to profile a large validation result <= 20000, and it worked, so I went bigger. The exception occurs at values > 20000, does anyone know of any inherent jgoodies memory leaks, with the validation framework, the component ...