Here Is My Number via @Bolehland_net late night...
- Phone numbers, sometimes even after months of knowing someone i can STILL not ask for phone number haha
Validates whether the value of the specified attribute is in the correct form by matching it against the VAT picture for the appropriate country. class Person < ActiveRecord::Base validates_as_eu_vat_number :identifier, :with => :country_code validates_as_eu_vat_number :full_vat_number end Configuration options: * <tt>message</tt> - A custom error message (default is: "is invalid") * <tt>with</tt> - Either a symbol referencing a field with the country code, or the code itself as a String. * <tt>on</tt> Specifies when this validation is active (default is :save, other options :create, :update) * <tt>allow_nil</tt> - Skip validation if attribute is nil. * <tt>allow_blank</tt> - Skip validation if attribute is blank. * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should occur (e.g. :if => :allow_validation, or :if => Proc.new { |user...
Full article: http://agilewebdevelopment.com/plugins/validates_as_eu_va...
@delicerubyrails
»
04 Jun '12, 12pm
- Phone numbers, sometimes even after months of knowing someone i can STILL not ask for phone number haha