similar to: validating phone numbers

Displaying 20 results from an estimated 1000 matches similar to: "validating phone numbers"

2005 Dec 15
5
site takes a while to load after first visit in a while
Using lighttpd + fcgi to power a site. When no one has accessed it in a while, the first visit to the page takes a while to load up. Then subsequent visits are fairly fast. Any ideas on how to fix it?
2009 Mar 18
2
Profiling question: string formatting extremely slow
Hi all, I'm using R to find duplicates in a set of 6 files containing Part Number information. Before applying the intersect method to identify the duplicates I need to normalize the P/Ns. Converting the P/N to uppercase if alphanumerical and applying an 18 char long zero padding if numerical. When I apply the pn_formatting function (see code below) to "Part Number" column of the
2006 Aug 14
3
validating required fields during an update?
I have a User model with an email attribute. I''m using the following validations: validates_confirmation_of :email validates_format_of :email, :with => RFC822::EmailAddress, :message => "must be a valid address in the form user@domain.com" validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your
2006 Apr 06
6
Flexible data schema in a database?
I figured I pose this to the list and see if any one can build a better mousetrap. The problem: 1. Store hierarchical data in a database, but without knowing the hierarchy beforehand. 2. Allow the user to define there own hierarchy, and allow the system to support multiple hierarchies. Call it a cataloging system, we have an object and we want to add data about that object to the system. Now
2005 Apr 01
11
I want to blog!
This isn''t Rails or Ruby related, but I just need some advice and thought I''d ask the bright individuals here. I want to start my own blog but I''m not sure where to begin. I don''t want to get a blogger account because I want to have my own domain. Blogger also doesn''t have many features. My hosting service is 1AND1 so it supports php, cgi and mysql.
2006 Apr 03
7
global variable - @@var
I tried to keep track of the number of access to a specific controller. I declared ''@@mycount = 0'' in the controller class. The methods in the controller will increment the @@mycount (@@mycount = @@mycount + 1) and print the value to the html page and show in the browser. The value is always 1, no matter how many times I access the controller and its action(s). Is this
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to DRY this up? It seems to be rather repetitive. validates_format_of :expiration_date, :with => /^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/ validates_format_of :activation_date, :with => /^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/ validates_format_of :some_other_date, :with =>
2006 May 05
16
Diff tool for OSX
I''ve looked for DIFF tools for OSX but haven''t found anything good yet. Tried guiffy (http://www.guiffy.com) but it''s very slow and the folder comparison doesn''t indicate a change until you drill down to the level with the difference which kinda defeats the purpose. I''m missing TortoiseSVN and the diff tool that comes with it. Any suggestions for
2006 Apr 18
10
Validates_ip_of
Hello all After being told of a funky date validator I will ask again for another validator :) Does anyone know of a plugin that validates that a field is the correct syntax for an IP Address? Thanks Jeff -- Posted via http://www.ruby-forum.com/.
2006 Feb 02
1
ordering of params
I have a few long forms. I want to email out the user''s response on the form. So I have something like: # View <%= text_field ''answer'', ''name'' %> Name <br /> <%= text_field ''answer'', ''email'' %> Email <br /> ...... # Controller def form_submit answers = params[:answers] email_text =
2006 Jan 31
4
Rails to Java
Hello, I just started playing with RubyOnRails. It is indeed fascinating! I have a question about using rails models to connect to backend Java (i.e. EJBs) instead of database. Any pointers will be appreciated. Thanks and Regards, Khaled -- Posted via http://www.ruby-forum.com/.
2006 Apr 11
6
Google Base... in Rails?
Ok, so this is kinda out of the blue... but I''ve been looking at Google Base and thinking that it''s got some really good ideas in it. Especially the way you can create your own "type" of item with its own custom attributes, like date range, location, number, text, etc. Kind of like defining a database with a GUI, but not exactly. It seems really interesting to me, from
2005 Nov 28
4
validates_format_of nil
I''ve noticed that validates_format_of will return invalid if the field is nil. Question 1) How should we declare a validation that will validate it with a regex if it is set, but, if the field is not set, just move on Question 2) Why is it done this way? The other validators are only invoked if the field is set . If you want to declare the field mandatory, you add a
2006 Apr 05
4
validates_format_of ?
Hi all, I''ve got a form which accepts a "price" field and I''m attempting to validate it and allow some flexibility in the way the user enters it. It''s a numeric field but I want the user to be able to enter dollar signs and commas naturally in the data entry. I''m trying to understand how to use validates_format_of, and I''m not sure what
2012 Aug 14
3
validates_format_of :message not working, validates_length_of :message is working
I''m using validates_format_of and the validation I want to do works, but I can''t get an error message to be displayed if the data is invalid: validates_format_of :mobile, :with => /\A[\+0-9]+\Z/, :message => " - Wrong" I have another validation some where else that does display the error message: " - Name is too long" validates_length_of :name,
2006 May 29
3
File.size() on Uploaded Images Fail
I am checking the file size of an uploaded file and storing it in a filesize column. It will work just fine when the user uploads any files other than images (jpg,png,gif). Word, Excel, Powerpoint, .zip and more all work fine. This is my model asset.rb that handles the file upload. def newfile=(newfile_field) self.filename = base_part_of(newfile_field.original_filename) self.filetype
2008 Feb 24
1
validates_format_of no dots allowed
I need a validates_format_of that disallow dots. In the api there is nothing to find about how validates_format_of exatly works. Is there a better documentation or is there something that can tell me howto disallow dots. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Feb 01
8
ruby equivalent of isset()
Hi, Is there a way to test if a certain (local) variable has been initialized? I''d like to do something like if isset(myvar) and myvar.true? #some code else #default behaviour end I have a lot of shared views that I call with params such as { show_pager => true Instead of having to explicitly say show_pager => false it should be possible to make false a default value, right?
2006 Feb 23
11
Sessions question
Hi, I''m a little confused about sessions. I have two objects, object "Apple" and object "Banana". These two objects have an N:M relationship. What I am doing is listing All of the Banana objects that are associated with a single Apple, then below that listing all of the Banana objects not associated with that same Apple. The user is then allowed to change the
2005 May 17
2
ajax insertion sort
Is there support yet for adding something to a list in sorted order? For example, you have a form to add a new item and you want the new item to be inserted in the list in the proper order. I''ve noticed the :position option in the form_remote_tag but it doesn''t seem like you can use it to keep things in sorted order. Rod Schmidt http://rodschmidt.blogspot.com "Do or