aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/validations/validates_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* confirmation validation error attributeBrian Cardarella2012-04-231-1/+1
| | | | | | | | | | | | This will render the error message on :#{attribute}_confirmation instead of on attribute itself. When rendering confirmation errors inline on the form with form builders such as SimpleForm and Formtastic it is confusing to the ender user to see the confirmation error message on the attribute element. Instead it makes more sense to have this validation error render on the confirmation field instead. The i18n message has been updated for the confirmation validator error message to include the original attribute name.
* Fixed test "ArgumentError: wrong number of arguments(1 for 0)"Arun Agrawal2011-12-171-1/+1
|
* Fixed bug when error message is an empty string.Antonio Roberto2011-12-161-0/+6
|
* Provide a way to specify alternate option keys for validatesCarl Lerche2011-02-051-0/+11
|
* Do not require that validation attributes be specified as symbolsCarl Lerche2011-02-051-0/+11
|
* Add support for namespaced validatorsSamuel Kadolph2010-12-161-0/+8
| | | | | | Includes test and documentation for new feature Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Better shortcut options for custom validators [#5672 state:resolved]Obie Fernandez2010-09-241-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-4/+4
| | | | 's/[ \t]*$//' -i {} \;)
* Make use of assert_equal to test equallity between object assert expects and ↵Santiago Pastorino2010-05-161-2/+2
| | | | | | | | object and a message of error [#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix typo by renaming :genre to :gender.José Valim2010-01-091-6/+6
|
* Allow validates to map some types to specific options. So now you can do:José Valim2010-01-081-11/+37
| | | | | | validates :email, :presence => true, :format => /@/ validates :genre, :inclusion => %w(m f) validates :password, :length => 6..20
* Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in ↵José Valim2010-01-071-3/+38
| | | | validates.
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-0/+53
attributes: class Person < ActiveRecord::Base include MyValidators validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } validates :email, :presence => true, :email => true end [#3058 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>