Vijay Dev
d7a85c5c51
revise docs [ci skip]
2012-02-01 23:31:43 +05:30
Carlos Antonio da Silva
26861e9506
Generate strict validation error messages with attribute name
2012-02-01 11:34:17 -02:00
dreamfall
7c3a5ec499
whitespaces
2012-01-17 13:19:30 +03:00
dreamfall
e84998cc21
validates method should not change options argument
2012-01-17 13:18:58 +03:00
Jean Boussier
fd17ffc7a2
Fix a tiny typo in custom validators documentation
2011-11-10 18:49:37 +01:00
Evgeniy Dolzhenko
c317419359
Use .add instead of << to add errors
2011-10-11 14:13:08 +01:00
Bogdan Gusiev
cbb147931b
Typo fix
2011-08-25 16:43:43 +03:00
Bogdan Gusiev
8620bf90c5
Implemented strict validation concept
...
In order to deliver debug information to dev team
instead of display error message to end user
Implemented strict validation concept
that suppose to define validation that always raise exception when fails
2011-08-17 17:26:00 +03:00
Carl Lerche
ed7614aa7d
Provide a way to specify alternate option keys for validates
2011-02-05 16:00:57 -08:00
Carl Lerche
7176ade35b
Do not require that validation attributes be specified as symbols
2011-02-05 15:37:38 -08:00
Samuel Kadolph
972011a2e5
Add support for namespaced validators
...
Includes test and documentation for new feature
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-16 01:49:28 +05:30
Obie Fernandez
275f922a23
Better shortcut options for custom validators [ #5672 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 12:49:16 +02:00
Xavier Noria
ea2ad26a8d
you rarely want ^ or $ in validations, use \A when you mean \A
2010-08-18 00:15:01 +02:00
Trey Bean
bee414748c
Missing object for comparison in ActiveModel::EachValidator example code.
2010-08-17 12:51:13 -06:00
Santiago Pastorino
b95d6e84b0
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 13:17:32 +02:00
Xavier Noria
fff917e37d
fixes a typo reported by rymai
2010-08-10 15:34:54 +02:00
Rizwan Reza
3ae67fbebb
Add titles to the rest of the files in active_model/validations/*
2010-06-15 22:20:19 +04:30
Evgeniy Dolzhenko
ccf9577aee
Fix a bunch of minor spelling mistakes
2010-06-11 14:15:34 +04:00
José Valim
afd0c06dfa
Validates needs hash slice.
2010-01-17 09:57:16 +01:00
José Valim
b078f7fd39
Fix typos and add tests to ensure they will be caught the next time.
2010-01-11 23:38:35 +01:00
José Valim
017f5d5308
Fix typo by renaming :genre to :gender.
2010-01-09 00:18:07 +01:00
José Valim
7045c4c279
Allow validates to map some types to specific options. So now you can do:
...
validates :email, :presence => true, :format => /@/
validates :genre, :inclusion => %w(m f)
validates :password, :length => 6..20
2010-01-08 21:36:04 +01:00
José Valim
47a5fd4c4b
Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in validates.
2010-01-07 19:23:59 +01:00
jamie
0a79eb7889
Add validates method as shortcut to setup validators for a given set of 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>
2010-01-07 19:23:59 +01:00