validation

Code for number validaion in text field in iphone xcode?

Code for number validaion in text field in iphone xcode? ...

What does the following ^.*$ regexp match?

Can someone explain what the following regexp matches? ^.*$ Thank you! ...

The remote certificate is invalid according to the validation procedure.

Hi, I'm developing a WCF service (NetTcpBinding) and it works just fine without security. We bought a certificate from DigiCert and installed it on the server and configured with DigicertUtil.exe. Also installed on the test client machines. Turning on the security I'm able to connect to it from my dev PC without problems. Server confi...

Rails validates_associated on destroy

I'm trying to validate an attribute in one model when I destroy another model. It's a complicated validation so I wrote a custom validation method. The problem is how do I call that validation method when I destroy the other model? I'd like to be able to do something like this: validates_associated :part, :on => :destroy Though appare...

MVC - Changing or adding a class for either 'Html.ValidationMessage' or 'Html.TextBox'

How do I change the class that is assigned to the control which is rendered by an MVC view by either the Html.TextBox or Html.ValidationMessage methods? ...

How do I disable validation in a Silverlight 4 application?

update How do I disable validation in a Silverlight 4 application? It looks like this is something not unique to RIA Services (as my original question below implies). I observe this when I bind my datagrid to a list of POCOs and I trigger a validation error in my grid (e.g. typing in a non-numeric in a cell bound to a numeric property)...

Number with comma separator validation regular expression is required.

Need a regular expression to validate number with comma separator. 1,5,10,55 is valid but 1,,,,10 is not valid. ...

how to use rspec to validate the ruby code?

class UbacParser def initialize(str) @str= str @valid= true base_parse end private def base_parse @protocol_code = Integer(@str[0..2]) rescue nil begin @data = @str[@str.index('<')[email protected]('>')-1] str_mod = @str[@str.index('>##')+1..-1] arr_mod=str_...

validates_associated model with condition

hello frens. I have the following validates_associated scenario class Parent include Mongoid::Document validates_associated :son validates_associated :daughter end when i create a parent, either of son or daughter is only created not both. Now my problem is, when i try to create parent with son, then validation fails due to daug...

How can I validate request arguments in SimpleFormController - Spring MVC

Hi. I want handle update operation using SimpleFormController. URL to this controller looks as follow: http://example.com/updatesomething.html?id=42 I wonder how to validate on the begining if object with the given id (42) exists, because I want display 404 error page when id is incorrect and stop processing. Thanks in advance f...

Does WCF UserNamePasswordValidator require checking PrimaryIdentity.IsAuthenticated?

Currently I have a service that uses a UserNamePasswordValidator to authenticate the client user. The code for the validation goes as follows: public override void Validate(String userName, String password) { if (userName == null) || (password == null) throw new FaultException("Username and/or password not specified....

Is there a good language/syntax for field validation we can re-use?

I'm working on a web app (using Python & Bottle) and building a decorator for validating HTTP parameters sent in GET or POST. The early version takes callables, so this: @params(user_id=int, user_name=unicode) ... ensures that user_id is an int, user_name is a string, and both fields exist. But that's not enough. I want to be able to ...

asp.net mvc 1 validation using dynamically created controls

Hello there, Using ASP.Net MVC1 and am dynamically creating the html in a model that is then dropped into the view and rendered at run time. My view is a single page that looks like this: <%@ Page Language="VB" Inherits="System.Web.Mvc.ViewPage" %> <%=(ViewData("Content"))%> This dynamically created content is mostly dropdownlis...

Is there a validation framework for .NET?

I'm building an .NET library and was wondering if there's any validation framework for that. My intention is just validate data-fields, you know, something like ASP.NET MVC validation attributes. There is any? Post-comments edit: Actually I am not using any framework like WPF or MVC. Just "plain object" library for data handling. I nee...

How/where to stop Django Formwizards 'done' method being called on payment failure

Hi there, I've looked through the django documentation, done lots of googling and have tried quite a few different solutions but to no avail. I've created a 3 part form using Django's FormWizard. Once the last form (a payment form) is validated, I send a payment request to a payment gateway. I'm doing the payment processing in the 'pro...

validation error message inside user control disappears after clicked outside

Why my valication error message disappear after click the submit button outside? Is there any way to keep it after clicked the submit button? ...

Will the ValidationResult.MemberNames property ever contain more than one value?

I search with reflector and I didn't manage to find a case where the ValidationResult.MemberNames is supposed to contain more than one value. So, first of all I am wondering why MS had to do it IEnumerable<string>, then now that they already did this, can I rely that this property will only return one value? Update Conserning the DataA...

How can I ensure that parent_id is set correctly when creating new item based on existing item?

The Problem Funny problem. Funny because it looks casual until you start thinking about it. Let's say I allow people to create items based on other items. You can open /items/new?id=3 and unlike your regular new action, instead of seeing an empty form, you will be seeing a form pre-populated with values from item-3. So unlike your avera...

Cast as integer in ColdFusion; sanitizing variables

I'm rusty at ColdFusion, I've been used to PHP for so long. What I want to do is something like this: <?php $id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0; ?> Basically, check for a url parameter called id and if it exists make sure it's an integer so I can safely use it in database queries. If it ends up zero, that's fine too. ...

How to use Html.CheckBox (list) with IEnumerable<T> with validation

Im working on a page where the user needs to fill in some information and finally make a selection of 1 or more customers with checkboxes. The list of customers is an IEnumerable<Customer> which i pass into my Model. Im a bit puzzled how i would go about creating the list of checkboxes using .CheckBoxFor(). And finally i would like to...