validation

Using k-fold cross validation in a neural network

Hi, I'm attempting to implement k-fold cross validation in an functional neural network. The training process is online, and I'm using k=10 for my initial testing. My question is: what is the best way to use the errors to figure out when to stop training? I compute the root mean squared error for each particular training instance (whic...

Please help me make this Rails code more dry. I must be missing something very obvious

This rails validation code is so ugly, and there must be a better way to do it. The short story is my user is inputting data from test results. Each specific test has 4 measurements. Usually the user inputs all 5 tests (20 measurements), but it's not always required. I just need to check that if a tester started inputting data for a ...

asp CompareValidator validating after postback

Is there any reason an asp CompareValidator validates after postback. ie everything runs when i click the button, and the error of the validator shows on the screen after postback. i have a compare validator on 2 dates (datefrom and dateto). if the dates are in gregorian format the validator works fine, but if the dates are in hijri form...

jQuery validating an CSV email array without the Validation Plugin...?

I have a textarea field that a user can upload a CSV file to populate the field. I then need to validate each one..here is the code I have but no luck: validateEmails = function(emailAddress){ var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; return reg.test(emailAddress); }...

ASP.NET Custom Validator + WebMethod + jQuery

Hi guys, I'm trying to implement a .NET Custom Validator that uses $.ajax to query a WebMethod on the same page and return a boolean value to indicate whether the result is true or false. The WebMethod I'm using is really simple [WebMethod()] public static bool IsPromoValid(string code) { string promoCode = "ABCDEFG"; bool res...

W3C validation error

The line <a class="product_image" href="http://www.symposiumwines.com/shop/product.php?id_product=11" > <img class="f-p"src="/shop/img/p/11-53-home.jpg" height="115" width="115" alt="Saint-Aubin 1er Cru &#039;Les Frionnes&#039; 2004"/> </a> generated by a CMS throws a couple of errors when I validate the page. 1) Attributes construct...

jsf multiple validators

i need to know how to use m multiple validators for multiple fields like name and email id,and age and phone numbers. i have a clue that in ajax i can use multiple validaors for one form with different fields, but in jsf only one field like name validator or email validator is working, if i use two validators for the same form its not wo...

From validation problem on Facebook tab

I am using static FBML but I am having trouble debugging a form validation problem. I get the dialogue which to me seems like it should return false, but the form submits anyway. I am using Firebug and I see a brief message in Red that I have no chance to read. I appreciate the help :-) var txt ='Enter Zipcode'; //... function setErr...

Is there a better way to perform validation in Entity Framework 4 than overriding SavingChanges?

It feels a little wrong to me to be doing Validation in your context which is your data layer. For the data layer to have a dependency on validation seems a little backwards. It makes more sense to me for validation to be done in business logic and once the validation is complete then persist the changes. The data layer should be able to...

Validating user input (search filters)

Hello, I'm building a search page and I'm a bit unsure on what I should in regard to sanitizing and validating user input. The search page has filters which are passed via querystrings. (some passed from inputs and others from links with checkbox/radio like behavior) What should I look out for in this situation? Can I be safe using ju...

How to handle service-layer validation in MVC3

I am working on a project which requires different validation sets for the same model, and we're trying to find the best solution to handle it. A simplified example could be using our Customer DTO: public class Customer { [Required] public string FirstName { get; set; } [Required] public string LastName { get; set; } ...

jQuery validation plugin question

Good Day, I have a web form that is using this awesome plugin and I'm trying to set up a rule. In my form, I have a Quantity field. If the Quantity field is set to 1 AND a checkbox is checked, then I want to validate a field. My form is setup like: Quantity TEXTBOX id = txtQuantity Gift? CHECKBOX id = #other R...

Authlogic, rails3_acts_as_paranoid and validates_uniqueness_of :login + default_scope(:conditions => {:active => true})

I want to be able to create multiple user accounts with the same login (because of the case a user deletes his account... and then sign up with the same login). I am using authlogic and rails3_acts_as_paranoid. But there is a problem: Authlogic validates the uniqueness of the login field - and IGNORES the default_scope(:conditions => {:...

Checking if field data changed before leaving page

How should you place one validator on a masterpage that wont allow postback of any content pages until all changed control data on that page has been either saved or canceled. The specifics of my current situation and the way its currently being done on my project are listed below This is an IE web application. The application is curre...

Is there a fast Form Validation Script? In jquery!

I have a small form with "name", "email", "request", "message" fields. All I want to do is highlight the borders of the input field red if the required info is missing upon submit. I want the form results emailed. Real simple. Can anyone suggest a fast script for me? Erik ...

Change board color to red on input validation with jquery?

Does anyone have any examples of input validation changing the input border color to red? Thanks. Erik ...

Django: How to override unique_together error message?

In a model's Meta class, I define a unique_together. I have a ModelForm based on this model. When I call is_valid on this ModelForm, an error will automatically raised if unique_together validation fails. That's all good. Now my problem is that I'm not satisfied with the default unique_together error message. I want to override it. How ...

Does anyone have a validation schema for Visual Studio 2010 for XHTML+RDFa?

Visual Studio validates XHTML 1.0 Transitional by default. There are custom solutions for validating HTML5. But if you are writing a site that uses any part of the Facebook API or the meta property tags then your HTML is probably invalid. Most people don't know to change their DOCTYPE to this: What I'd like to know is, does anyone hav...

CompareValidator messes up validationgroups in Firefox (ASP.NET)

I used a CompareValidator like so: <asp:CompareValidator ID="cvtxtDOB" runat="server" Operator="DataTypeCheck" ControlToValidate="txtDOB" ErrorMessage="Invalid date format" Text="*" ValidationGroup="GeneralValidations" Type="Date"></asp:CompareValidator> If I enter a date using this format 31/01/10 (for 31 January 2010), Firefox throw...

client side validation for asp.net mvc dropdown?

hi, i just wanted to know how to enable client side validations for dropdowns in asp.net mvc 2. The scenario would be that the dropdown will contain a "Select" item and the list of other items..,The user should select other items... the validation should fire when the user does not select the other items public class FacilityBulletinMod...