form-validation

How do I cancel a server control event in the client side?

hello, I have an asp.net image button and I want to cancel the click event incase he fails the client side validation... how do I do that? ...

jquery validate form input if certain check boxes are checked

I have a multipart form that takes basic user information at the beginning with some jquery.validate error checking to see if the fields have been filled in and the email address is valid. Below that there is a series of check boxes (type_of_request) for new accounts, delete accounts, new software etc which show/hide those form elements...

Javascript Regular Expressions - Required field validation

Hello, How do I check if a field (textbox) is empty or filled only with white spaces (spaces/enters/tabs etc.), using javascript RegExp? ...

ASP.NET define input validators programmatically depending on configuration

I'm writing an ASP.NET 3.5 web application. There is a rather complex input form (30 input controls - TextBoxes, Dropdownlists, ...). Now, different clients use the same form in their customized application and there are different mandatory fields for some clients. Now, I'd like to programmatically create/activate certain validators de...

ASP.NET: Custom client-side validator for "one of two fields must be filled"?

Can you tell me if there anybody has implemented a custom validator for checking that one of two (or N) input fields are filled? "Insert phone number or email address" I'm using ASP.NET (Ajax) 3.5, the ajaxToolkit:ValidatorCalloutExtender (and jQuery if it's necessary). ...

How do I use an ASP.net asp:RangeValidator to validate a date properly?

Here's my code: <asp:TemplateField HeaderText="* License Setup Date"> <EditItemTemplate> <asp:RequiredFieldValidator ID="LicenseSetupDateRequired" ErrorMessage="License Setup Date can't be blank." ValidationGroup="EditClientDetails" ControlToValidate="BeginDate" Text="*!" ...

Webform Validation Frameworks

I find that in most of my web projects a large majority of my time is spent validating user input both on the client-side and on the server-side. I have worked with the ASP.NET form validation controls, but I have always found them to be cumbersome and never really work the way I intend them too. So usually I end up rolling together my...

Solution for e-Forms engine

My client is asking for a solution that handles e-forms generation to be done by a technology-savvy user (not a developer). In other words, An e-form engine for dynamic creation and implementation of electronic forms. Is there any tool/solution in the market available that handles this requirement? I would love to avoid building it fro...

Javascript onchange event preventing onsubmit event in HTML form?

Consider an HTML form: <form action="" method="POST" onsubmit="return checkValidArray()"> <input type="text" name="data" onchange="return validate(this);"> </form> It appears (in both IE 6 and Firefox 3) that when you type some text into the input field and click submit that the onchange event fires for the input field, but the on...

Spring MVC validation with Annotations

I'm having quite some trouble since I migrated my controllers from classical inheritance to use the annotations like @Controller and @RequestMapping. The problem is that I don't know how to plug in validation like in the old case. Are there any good tutorials about this? ...

Validation in struts 2

Hi all, Please solve my following confusions about validation in Struts2 - 1) Can we do client side and server side validation through JavaScript ? 2) Can we do client side and server side validation through AJAX ? If possible then which one is beneficial for client side validation and which one for server side ? Looking for your rep...

How do you do validation in ASP.NET MVC RC?

Does ASP.NET MVC provide a standard validator functionality or do you have to create your own validation manually? If the latter, is there any third party validator available that you can use on ASP.NET MVC web applications? ...

Simple PHP form Validation and the validation symbols

Hi have some forms that I want to use some basic php validation (regular expressions) on, how do you go about doing it? I have just general text input, usernames, passwords and date to validate. I would also like to know how to check for empty input boxes. I have looked on the interenet for this stuff but I haven't found any good tutoria...

asp.net MVC - ValidationSummary not displaying

Hi All I have a strange problem whereby the ValidationSummary is not being displayed. However, the ValidationMessage's are being displayed. I've checked the output page source and it's not as though they are in a colour that is obscuring them. I'm using the RC. Any ideas? Edit: Break point set at ValidationSummary shows: ViewData.Mode...

Why won't this form validate?

The "onsubmit" statement is not called: <form action="index.php" method="post" onsubmit="return validateSearchKeyword()"> <input class="text_search" id="text_search" name="text_search" type="text" value="search" onfocus="if (this.value=='search') this.value = ''" onBlur="if (this.value=='') this.value = 'search'" /> </form> ...

Validating multi-line text input when using .NET

I have an HtmlTextArea and I want to restrict the number of characters users can input to 500. Currently I've used a RegularExpressionValidator... RegularExpressiondValidator val = new RegularExpressiondValidator (); val.ValidationExpression = "^.{0,500}$"; val.ControlToValidate = id; val.ErrorMessage = "blah"; ... this is fine when ...

ASP.NET form validation - highlight fields with JS/DHTML

Hello, I have an issue that's been bugging me this morning. I'm building an ASP.NET webforms app that has many input forms and I'm trying to standardise how I manage validation. I would like to use the built-in validators (RequiredFieldValidator, Regex etc). My html requirements are: Before validation: <div class="formLine"> <label...

Errors on non model fields in rails

What's the best way to report errors on form fields not associated with a particular model in Rails? As an example, I have a form for the batch creation of user accounts with random users / passwords. It takes as inputs the quantity of users to make, information about what attributes all users should have, and information about the batch...

AJAX live email validation (PHP)

When a user creates an account on my website, i want the inputted username to be checked against all the current usernames in my database(MySQL) and confirmed if it is available. Does anyone know any good libraries i could use, or a plug-in for JQuery perhaps? Thanks, Ben. ...

How is the machineKey validationKey used when creating a sha1 hash?

<machineKey validation="SHA1" validationKey="<64-byte key>" What exactly does the validationKey do? Say I create a hash with SHA1. How does the validationKey play in to it? Consider this code: HMACSHA1 hashSha = new HMACSHA1(_validationKey); byte[] ret = hashSha.ComputeHash(bytes, offSet, count); return ret; We are generating a new...