lib/macros.rb in validatable-1.6.2 vs lib/macros.rb in validatable-1.6.3

- old
+ new

@@ -11,16 +11,17 @@ # # The logic option is required. # # Configuration options: # + # * after_validate - A block that executes following the run of a validation + # * group - The group that this validation belongs to. A validation can belong to multiple groups + # * if - A block that when executed must return true of the validation will not occur + # * level - The level at which the validation should occur + # * logic - A block that executes to perform the validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies - # * level - The level at which the validation should occur - # * if - A block that when executed must return true of the validation will not occur - # * group - The group that this validation belongs to. A validation can belong to multiple groups - # * logic - A block that executes to perform the validation def validates_each(*args) def validates_each(*args) add_validations(args, ValidatesEach) end # call-seq: validates_format_of(*args) @@ -35,10 +36,11 @@ # # A regular expression must be provided or else an exception will be raised. # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * with - The regular expression used to validate the format @@ -57,10 +59,11 @@ # validates_length_of :last_name, :minimum=>30 # end # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * minimum - The minimum size of the attribute @@ -81,10 +84,11 @@ # validates_numericality_of :age # end # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * group - The group that this validation belongs to. A validation can belong to multiple groups @@ -103,10 +107,11 @@ # validates_acceptance_of :eula, :message => "must be abided" # end # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * group - The group that this validation belongs to. A validation can belong to multiple groups @@ -129,10 +134,11 @@ # <%= password_field "person", "password" %> # <%= password_field "person", "password_confirmation" %> # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * case_sensitive - Whether or not to apply case-sensitivity on the comparison. Defaults to true. # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur @@ -152,10 +158,11 @@ # # The first_name attribute must be in the object and it cannot be nil or empty. # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * group - The group that this validation belongs to. A validation can belong to multiple groups @@ -174,9 +181,10 @@ # # The logic option is required. # # Configuration options: # + # * after_validate - A block that executes following the run of a validation # * message - The message to add to the errors collection when the validation fails # * times - The number of times the validation applies # * level - The level at which the validation should occur # * if - A block that when executed must return true of the validation will not occur # * group - The group that this validation belongs to. A validation can belong to multiple groups \ No newline at end of file