validation

VB.NET Form with placeholders that contain elementsthat have to be validated

I have this silly problem: I have a form with X fields and the possibility to add (visible = true) extra 'Cursisten' (contains 3 fields per cursist). I added 10 placeholders that will be enabled one after another whenever the last 'cursist' was filled in completely. This is because I enabled validation on the placeholder elements that a...

Normalizing/validation for international data sets in a database?

Lets say you are dealing with your normal contact database (you know... name, phone number, address, email, etc...). If you're concerened about this locally, it's generally not a big issue to deal with, but when we look at international sets it is. Looking at the phone number system, you would think it's simple, but it's really not. In ...

Binding with ValidatesOnException throws Unhandled-Error in .Net4

I encountered a very annoying change for me from .NET3.5 to .NET4.0. When using a ExceptionValidationRule on a binding for validating the exception thrown in the bound properties setter gets handled by the binding in 3.5. In 4.0 it is thrown as unhandled while debugging. Changing the target framework from 3.5->4.0 in this small example ...

Assert keyword in java

Hi! Do you use this keyword or throw some validation runtime exception? What benefits it gives to you or why you think it's not worth to use? Thanks. ...

Validator offers no controls to validate.

I've created a DetailsView with a Calendar TemplateField. When I drag a RangeValidator near the calendar to try and validate the date range, the ControlToValidate dropdown property for the RangeValidator is blank and fails to display the Calendar control for me to select it. How can I get the RangeValidator to show the calendar in the ...

Is Data Annotations really a good idea for validation?

As I'm learning more and more about ASP.NET MVC the more I am introduced to Data Annotations. Specifically in MVC they are used for validation and this gives me some concerns. The biggest is due to the fact that I like to keep my model as POCOs and as clean as possible. Now what if I have those model classes shared across multiple projec...

Where are Default Validation Error Messages in Rails 3.0?

Where are the default validation error messages in Rails 3.0? What is the equivalent of ActiveRecord::Error.default_error_messages[:taken], for example? I have gotten as far as finding that ActiveModel handles the errors rather than ActiveRecord, but I can't find the errors themselves. ...

text box percentage validation in javascript

How can we do validation for percentage numbers in textbox . I need to validate these type of data Ex: 12-3, 33.44a, 44. , a3.56, 123 thanks in advance sri ...

Storage of different data formats in Rails dynamically defined by admin

I'm facing a problem where I cannot permanently decide which columns one of my models will have. A use case will be this: An admin creates a new dataset, he wants users to answer. In the dataset the admin defines several data points of different format and units. I could imagine the classes to look similar to this: class Dataset < ...

How can I show errors in jQuery validation?

Do we have any function which returns all the error messages while validating a form? I have tried using the defaultshowerros() function but it returns the error message for the element it is currently validating. How can I get all the error messages of the whole form? ...

cakephp validation response returning data to controller

Hi i have made a custom validation in the model. How can i access the result($visitor) from this in the controller? model: <?php class Visitors extends AppModel { var $name = 'Visitors'; var $validate = array( 'xxx' => array( 'rule' => array('checkxxx'), 'message' => 'yyy.' ) );...

How to check wether a directory is a sub directory of another directory

Hello, I like to write a template system in Python, which allows to include files. e.g. This is a template You can safely include files with safe_include`othertemplate.rst` As you know, including files might be dangerous. For example, if I use the template system in a web application which allows users to create their own t...

Best way to handle multiple form validation in ASP.NET MVC

Overview I have a payment page where I allow the user to select a payment method, either credit card or check. I have a form for each of these payment methods. I did not want to create a separate page for each of these methods for UI purposes, so I use a [div] for each form and toggle their display with jQuery. Problem Each of the pa...

Mimicking Validation Behaviour without Validation

We have several data objects in our application that wind up bound to grids. We have them implementing the IDataErrorInfo interface, so that by adding error messages to the properties, we see the rowheader change style and the DataGridCells gain a red border. All well and good. We now have an additional requirement that rather than...

How do I validate WSDLs and SOAP responses?

I am looking to build web services using SOAP. What standards should I follow for formatting WSDLs and SOAP responses and what tools are available to verify I am using the correct standardized formats? I was thinking something along the lines of W3C's HTML validator but for SOAP and WSDLs. Does any such thing exist? ...

How would you go about validating that a regex actually compiles and works, ie doesn't throw an error?

I'm creating an administration panel that has regex's submitted to it. Any ideas on how I would go about validating the submitted regex's to see if they work. When I say "see if they work" I mean if the regex's are valid and compile properly, not that they actually match data or not? FYI, This would be in PHP. ...

Drupal Webform Validation (webform_form_alter)

Hey all, I'm doing some webform validation using webform_form_alter. I'm using webform_form_alter because I switch certain content on a "select" field. In my webform-form-317.tpl.php I defined new fieldsets I set my fields into this new fieldset and unset the original from the webform. $form['submitted']['ContactInfo'] = array( '#type...

Evaluate whether date is not one of past dates in model -- Ruby on Rails

I have a Day model which has a date column. I have to implement the validation that the date column must not have a past date. If the date is a past date it must not get saved to the database and give the appropriate error message right on the. I know I can put this validation in the controller, but I think it violates the MVC rules i.e ...

Where is the best place to define validation for a field?

A name field needs to be verified as starting with a capital letter and not being allowed to take a number. I'll do this with regular expressions. Implementing the MVC pattern. Should I have the controller send the value that was input to a checking class and send corresponding error msg's back to the UI and after checking then call t...

Detecting javascript in HTML

Hi, I have two applications where users can submit HTML pages. I would like to make sure that no scripts are included in the HTML. Normally you would escape content to get rid of scripts, but as this is HTML I can't do that. Anyone with good suggestions on how to do that? The applications are written in both C# and Java ...