validation

WPF lengthy Validation Scenario

Hi, in my scenario I have a Linq2SQL Data backend. my Dataobjects implement IDataErrorInfo to catch errors like Name==null (fast to execute Validationrules that only require the value, nothing special so far ) the Dataobjects are organized in a tree-structure, so each has a Parent and Children How can I validate if a chosen Name is U...

Validating actions in Symfony (PHP)

I've been reading some Symfony documentation regarding validation/error-handling for controllers. http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer Validation and Error-Handling Methods (just over 2 thirds down) I like the idea of a function automatically being called - validateMyAction before executeMyAction is c...

WCF FaultException - crashes App Pool when "re-throwing" from internal WCF call

I have a WCF service that's hosted in IIS, and uses a WS HTTP binding (the external service). This service ends up calling a second WCF service that's hosted in a Windows service, over Net TCP (the internal service). When the internal service throws a FaultException, the external service crashes rather than throwing it to the client. All...

ASP.NET MVC 2 Create Model using POST

I have the following model: public class Product { public int Id { get; set; } public string Name { get; set; } private int CategoryId { get; set; } public Category Category { get; set; } public string InventoryDetails { get; set; } } I have an action in my controller which is used to create a new product. My question is how to l...

How to avoid validation loop?

Hi, I have a form that has two checkboxes, "A" and "B" and the form that is broken into steps. If "A" is checked and "B" isn't I need to display an alert when user clicks on the next step button, stopping the form from progressing only once,. like if ($("#A").is(":checked") && $("B").is(":not("checked")") { alert("foo"); }); how do...

Adding Validation to a Custom List Control in sharepoint designer

Hi, I'm trying to implement the requiredfieldvalidator asp.net control in sharepoint designer. I have dragged the control to the page and associated the control with the field in the tag properties editor by going to the controltovalidate property. I save and test the page. The field is blank yet does not show the validation alert. ...

Server/Client input validation for asp.net form using attribute / dataannotation

I was playing with asp.net mvc 2's DataAnnotation validation. It hookup to the client side validation very nicely. I really like that I can just define one sets of rules and be able to user it at both client and server side. I am wondering if it is possible to do it with asp.net form. The following code snippet shows how it is done, an...

How to prevent XSS in a Classic ASP multipart form [URGENT]

I am calling on the collective mind of the stackoverflow community to help this novice programmer fix a major issue. I have a multipart form written in Classic ASP that is based on the code below. I use stored procedures and parameters to write to the sql DB, I use Server.HTMLEncode before it is submitted also. I have javascript based v...

Validation Summary in TabControl (Silverlight 4)

Hello, everyone. Here is my question. I'm using MVVM pattern in my project and i have a UserControl, which has a TabControl on it. TabItems have validations on them. Main page looks like this: <UserControl> <DataInput:ValidationSummary x:Name="ValidationSummary"/> <Grid x:Name="LayoutRoot"> <DataInput:ValidationSummary ...

Rails not showing validation error messages

HI guys, I am new to rails and just doing my first registration form. I have some validations that I want rails to check but for some reason it does not show the error messages. On the views/user/signup.html.erb I have this <h1>Register Now!</h1> <% form_for :user, @u, :url => { :action => "signup" } do |f| %> <%= f.error_messages ...

How to write one action class and action-validation.xml to validate two forms in a two different jsp pages by struts2

I'm creating an struts2 application which has a login page and another user details page. There, i need to create only one action class. Because of that I'm unable to run the application by adding the field validations in both two pages to the action-validation.xml. Because with the login page validation it validate remaining field valid...

Unique constriaint with data annotation

Hi, I'm using the System.ComponentModel.DataAnnotations namespace to validate my domain classes. How can I create a custom attribute to validate the uniqueness of a property regardless of the database(through some interface for example)? ...

Pylons, FormEncode and external validation

Hi everyone! I'm building a web frontend to a server-side application, using Pylons 1.0. Right now I'm writing the first form, and I'm facing a problem concerning validation.. Using FormEncode and the @validate decorator I can easily validate the user input from a client-side perspective, but when I submit the data to the server, it may...

How can I validate a ViewModel in jQuery Dialog?

My AddressEditViewModel has a bunch of attributes marked [Required(ErrorMessage="My Error Message Here")] and/or [DisplayName("etc")]. The DisplayName attributes work: <%: Html.LabelFor(model => model.Field) %> , and I think the Required attributes are working too, but I don't know how to provide feedback on the form (jQuery UI Dialog...

TSQl EXCEPT validation

Hi I am writing a long program in TSQL that pulls in data from an OLD (and very dirty data set) scrubs the data and reformats the output including column headers to match a new data set There are 130 columns in both the new and old tables. For the purpose of testing I am bringing in 100k rows from each. To validate that the table struct...

Rails: Validate that a link won't create a 404 error

So I have a web app where both users and non-users can submit links to content. My web app is a site where users receive donations to content so I make sure that users verify that they are the owner of a website before receiving donations. So when users submit a link from their own site they get a form with a select field of all the sit...

W3C Validator - Document type does not allow element "body" here

I am trying to validate the following code with the W3C validator: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Test</title> </head> <body> </body> </html> I get two errors: ...

I need some help understand Django form validators

I've read the Django documentation here: http://docs.djangoproject.com/en/dev/ref/forms/validation/ I've also browsed a number of search results on Google and Stack Overflow, but I haven't been able to answer my questions below. As an example, say I have a model named "Widgets" with a CharField named "product_name". Now say that I wa...

A tool to validate xml using xdr

That's basically the question, I have a XDR file which describes the format of the XML, and the XML itself. I can't find a tool/script/PHP solution to check the validity of the XML. Thanks for any help. ...

Multiple Select validation with jquery

Hi, I have this multiple select: <select id="sel_dest" name="dest_var[]" multiple disabled="disabled" size="10"> <option value="" selected>Destinatario</option> <option value="1"> ......... </select> how can i validate (required field) this select with jquery validation plugin? this code doesn't work: $("#register_form").validate({...