From 6f944c06c86fcf30f257202fa10f0ccad6014ef5 Mon Sep 17 00:00:00 2001 From: CassioMarques Date: Mon, 10 Nov 2008 20:40:32 -0200 Subject: Added info about validates_size_of, as being an alias for validates_length_of --- railties/doc/guides/html/activerecord_validations_callbacks.html | 6 ++---- railties/doc/guides/source/activerecord_validations_callbacks.txt | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/doc/guides/html/activerecord_validations_callbacks.html b/railties/doc/guides/html/activerecord_validations_callbacks.html index 6953c3979a..7149ee5f90 100644 --- a/railties/doc/guides/html/activerecord_validations_callbacks.html +++ b/railties/doc/guides/html/activerecord_validations_callbacks.html @@ -235,8 +235,6 @@ ul#navMain {
  • The validates_presence_of helper
  • -
  • The validates_size_of helper
  • -
  • The validates_uniqueness_of+ helper
  • @@ -524,6 +522,7 @@ http://www.gnu.org/software/src-highlite --> validates_length_of :bio, :too_long => "you're writing too much. %d characters is the maximum allowed." end +

    This helper has an alias called validates_size_of, it's the same helper with a different name. You can use it if you'd like to.

    3.9. The validates_numericallity_of helper

    This helper validates that your attributes have only numeric values. By default, it will match an optional sign followed by a integral or floating point number. Using the :integer_only option set to true, you can specify that only integral numbers are allowed.

    If you use :integer_only set to true, then it will use the /\A[+\-]?\d+\Z/ regular expression to validate the attribute's value. Otherwise, it will try to convert the value using Kernel.Float.

    @@ -576,8 +575,7 @@ http://www.gnu.org/software/src-highlite -->

    The default error message for validates_presence_of is "can't be empty".

    -

    3.11. The validates_size_of helper

    -

    3.12. The validates_uniqueness_of+ helper

    +

    3.11. The validates_uniqueness_of+ helper

    4. Common validation options

    diff --git a/railties/doc/guides/source/activerecord_validations_callbacks.txt b/railties/doc/guides/source/activerecord_validations_callbacks.txt index 4dfa92e542..04248d592f 100644 --- a/railties/doc/guides/source/activerecord_validations_callbacks.txt +++ b/railties/doc/guides/source/activerecord_validations_callbacks.txt @@ -219,6 +219,8 @@ class Person < ActiveRecord::Base end ------------------------------------------------------------------ +This helper has an alias called +validates_size_of+, it's the same helper with a different name. You can use it if you'd like to. + === The +validates_numericallity_of+ helper This helper validates that your attributes have only numeric values. By default, it will match an optional sign followed by a integral or floating point number. Using the +:integer_only+ option set to true, you can specify that only integral numbers are allowed. @@ -260,8 +262,6 @@ NOTE: If you want to validate the presence of a boolean field (where the real va The default error message for +validates_presence_of+ is "_can't be empty_". -=== The +validates_size_of+ helper - === The validates_uniqueness_of+ helper == Common validation options -- cgit v1.2.3