validation

Trouble with a word limit range regular expression....

I am using a regular expression to limit words entered in a textbox field to 250-500 words. (((^\s*)*\S+\s+)|(\S+)){250,500} Since I know little to nothing about regular expressions, I had copied it from another website. I get the validation error regardless of how many words are entered. Here is the page that the form is on, if you w...

asp.net validation to make sure textbox has integer values

I have a required validation setup on a textbox, but I have to make sure it is an integer also. how can I do this? ...

Where to perform argument validation in JavaScript?

Yeah, read properly. In the last time I saw different patterns of argument validation in JavaScript (functions) and wondered which of them would be best-practice. At first I'll show two example code snippets. The first shows an (in my words) "immediate" argument/condition validation and the second one a "delayed" validation. Each of them...

https form validation not passing SESSION VARIABLES - PHP

I had my form processes working perfectly but after renaming the form action to <form action="https://www.example.com/validate.php" method="post"> for working with an SSL certificate it stopped working. Seems as though the SESSION variables are no longer being passed properly... Is there something I should know about https an...

Using attributes to specify element structure in XSD

I would like to specify the structure of underlying child elements based upon an xml attribute value. For example: <param type="uniform"> <high>10</high> <low>0</low> </param> <param2 type="normal"> <mean>5</mean> <stdev>2.5</mean> <param2> Is there a way to validate this type of structure using XSD? ...

XSD any element validation error with CDATA

I have an XSD with an any-element (<xs:any/>) When I create an instance of this XSD and place a CDATA section in it, I get validation errors. I also tried with attributes like: minOccurs="0" maxOccurs="unbounded" processContents="skip" I use XmlSpy for schema validation. ...

Does socket data need to be error corrected?

When using socket communication in PHP, do I need to confirm if a message has been successfully received after sending each message? Or would the transport layer (TCP) take care of error detection and correction, ensuring successful delivery of any sent messages? ...

Adding jQuery conditional validation to dynamically-generated HTML

I have the following HTML scenario: <div> <input id="txt0" type="text" /><input type="checkbox" id="chk0" /></div> <div> <input id="txt1" type="text" /><input type="checkbox" id="chk1" /></div> <!-- etc --> <div> <input id="txtN" type="text" /><input type="checkbox" id="chkN" /></div> If checkbox N is checked, then textbox...

Validations not working

I have few text boxes which has required field validation. In the same page there is a back button and next button. When i click in the back button the validations are working, when i click on the next button validations are not working (means the form is moving to the next page) Please help me to rectify <%@ Page Language="vb...

What Perl modules are useful for validating subroutine arguments?

I'm looking for a general-purpose module to take the drudgery out of validating subroutine and method arguments. I've scanned through various possibilities on CPAN: Params::Validate, Params::Smart, Getargs::Mixed, Getargs::Long, and a few others. Any information regarding pros and cons of these or other modules would be appreciated. Tha...

Validation button problem

I have few text boxes which has required field validation. In the same page there is a back button and next button. When i click in the back button the validations are working, when i click on the next button validations are not working (means the form is moving to the next page) <%@ Page Language="vb" AutoEventWireup="false"...

Upon postback, I want to add a message to validation summary

When a user tries to save a piece of content, if it had any issues I want to insert a message into my asp.net validation summary control. how can I do this? ...

How to verify input in UITextField (i.e., numeric input)

Hello all, I am fairly new to iPhone development and I have what seems to be a simple question that I cannont figure out. How can I verify that a user input a number and a decimal into the text field? I have tried many different things but the closes I can get only allows for numeric strings of the form: 5.34 or 23.89. I need it to ...

Is it possible to validate XML against an XSD in Silverlight 3?

Is seems like all the commonly-used classes for XMLValidation, for example XmlValidatingReader, are absent (or present "for interface compatibility only") in Silverlight. Is there any way to validate XML against an XSD schema in Silverlight? ...

Javascript Validation or ASP Validation?

I was talking to a co-worker and we had a discussion on client side validation. Which validation method is better (javascript/asp.net validation)? I know when javascript is disabled on the browser then validation would be disabled but with asp.net validation control, you can just call the method page.validate() to do validation even ...

Why does ASP.Net add a "border" attribute to asp:Image

So I have an asp.net image tag: <asp:Image runat="server" ImageUrl="~/Images/img.jpg" width="350px" height="250px" AlternateText="My Image" /> but it's outputting this: <img src="Images/img.jpg" height="250" width="350" border="0" /> ...the XHTML validator reckons that the "border" element shouldn't be there...but it's ASP.Net that...

How can I validate text as being valid HTML?

I'm using an older version of Telerik's Editor control, and storing the text that's input in a SQL database, then displaying the HTML later. Is there any way in ASP.NET (2.0) to validate a string as being valid HTML before saving to my database? Thanks! ...

jQuery Validation Enable Submit Button when Valid

I am using jQuery validation on my form and I would like to be able to disable the submit button and change its class, when the form validates. I know I could bind a function on the key up event but I want to know if this is possible from within the jQuery validate framework. I tried doing what this guy suggested, but got nowhere. I am...

WPF Expander still shows Validation Error adorner when shrunk

I've got a style for a TextBox to show a validation error message as follows: <Style TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, ...

What are some best practices for Model validation in ASP.NET MVC?

I'm not interested in answers concerning client side validation or model binding. Really, this question could apply to any data access class library outside of MVC, but the issues are similar, I think. I'm using the Repository pattern currently for data access with my entities (models). Currently the repositories handle all of the CRU...