Hi,
I'm looking for a regex or a way to format the NumberValidator so that only decimal places are allowed.
The domain="real" allows you to put integer values, but I need to force the user to but in 2.0 if they want an integer.
This is because they pass through a Castor mapping file, it complains if it gets an integer when it expects...
Hi,
I am working on login page validation for twitter application. I have downloaded the sample code of "XAuthTwitterEngineDemo". Now i have created kOAuthConsumerKey and kOAuthConsumerSecret keys and implemented in my code. But i donno, how to create "cachedXAuthAccessTokenKey".
#define kCachedXAuthAccessTokenStringKey @"cachedXAut...
I'm still fairly new to rails so I'm not sure what I'm missing here.
I'm using GeoKit to geocode an address upon saving. I have a method that geocodes an address and if it fails to find it, it adds an error to the errors list. I've tested it in the console and it is failing on the geocode (presumably adding the error) but still saving s...
I have a form on which I use validation. This form has a section for photo upload. Initially this section contains six elements with the following code:
<img class="photo_upload" src="image/app/photo_upload.jpg">
I have bound a function to the click event for the class of photo_upload. This function replaces the image with a minimal ...
Hello All,
I am building a ASP.NET Mvc app. I have a Data model say User
public class user
{
public int userId {get; private set};
public string FirstName {get; set;}
}
The validation to be done is that the firstname cannot exceed 50 characters.
I have another presentation model in which i have the property FirstName too. I...
I installed validation_reflection as a gem and out of the box it picked up on my validates_presence_of validations. But it is not picking up on any of the other default rails validations such as validates_format_of.
I know from the documentation that i am supposed to add something like:
config.reflected_validations << :validates_for...
Hi
I want to validate my php project to meet the w3 standard so ...Can some one explain how to do the php file validation usind w3c.org
...
My example form
<% form_for @ad do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :ad_type_id %><br />
<%= f.collection_select(:ad_type_id, AdType.all, :id, :name) %>
</p>
<p>
<% @ad.ad_properties.each do |property| %>
<%= property.name %>:
<% f.fields_for :ad_values do |value_field| %>
<%= value...
Hey guys ive got the following Model for Accounts
require 'net/http'
require 'uri'
require 'date'
class Account < ActiveRecord::Base
validates_presence_of :username, :password, :on => :update
validate :valid_expiry_date, :on => :update
def valid_expiry_date
reply = Net::HTTP.get URI.parse("http://api.rapidshare.com/cgi-bin/rsapi....
My website has an opt-in member directory. Currently, the error checking function simply looks at the form $_POST to see if (!empty($userRealName)) and then allows the member to appear in the list.
It took about 30 minutes for someone to show up as a blank name in the list, and upon examination of the database I've determined it's becau...
Hello,
I came across something strange when creating an edit form with MVC 2.
i realised that my error messages come up on form sumission even when i have filled ut valid data!
i am using a buddy class which i have configured correctly ( i know that cos i can see my custom errors).
Here is the code from the viewmodel that generates thi...
There have been a couple of discussions regarding the location of user input validation:
http://stackoverflow.com/questions/659950/should-validation-be-done-in-form-objects-or-the-model
http://stackoverflow.com/questions/134388/where-do-you-do-your-validation-model-controller-or-view
These discussions were quite old, so I wanted to as...
Hi,
I want to validate an xml file against an xsd schema. The xml files root element does not have any namespace or xsi details. It has no attributes so just .
I have tried the following code from http://www.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html with no luck as I receive
cvc-elt.1: Cannot find the declaration of el...
Can't believe how difficult this seems to be all I want to is to validate a user inout using javascript to make sure that it is an email address. But can't get it to work:
I am using:
//validates a regulaer expression
Utilities2.prototype.validateEmail = function(stringToValidateArg)
{
alert('about to check regexp');
var regE...
My site utilizes a WYSIWYG editor for users to update their accounts,enter comments, and send private messages.
The editor (CKEditor) is great for only allowing users to enter valid input, but I worry about injection through TamperData or other means.
How can I control this on the server side?
I need to whitelist specific tags: <b><...
For example, you send an unsubscribe message to a legitimate company or a spam, they reply that they will remove you and it may take up to 72 hours to take effect. I find it hard to believe anything that simple could take more than 3/4 of a second to take effect system wide.
Another example would be when you call the visa activation lin...
I am not able to validate passord with ()-=_+ , i.e it should accept these special characters but its not working when i use the regular expression as
`validates_format_of :password, :with => /^[A-Za-z0-9. ! @ # $ % ^ & * ( ) _ - + = ]*\z/`
its only excepting till * but not accepting ()-=_+ in ruby on rails.
...
hello,
thanks for your attention and time.
I want to implement validations in settter of properties. Here is an issue where your expert help is required please.
I have idea of how I will do validations before setting value. but not getting what to do if passed value is not correct. Just not setting is not a acceptable solution as I wa...
Could you give me an example of the way I should code into the pfc_Validation event? This is an event that I have never used. For example here is something I have coded in the ue_itemchanged event.
if dwo.name = 'theme' then
This.Setitem(row,"theme",wf_clean_up_text(data))
end if
if dwo.name = 'Comments' then
This.Setitem(ro...
Hello.
I have a problem validating data on view that is not strongly typed. I'm updating data from 3 different models on that view, and I have validation methods that work on them, but I don't know how to display the validation message.
Where should I put validation messages (for strongly typed views I put them in ModelState, I presume...