Validates Unlike Plugin (v 0.1) ======================= Validates Unlike plugin validates that the value of the specified attribute doesn''t match against the regular expression provided Class Contact < ActiveRecord::Base validates_unlike :comment, :with =>/html|http|onclick|onmouseover/ , :message => "comment can''t include: href,http,onclick,onmouseover." end ======================= Bug reports and feedback are always welcome. Please send them to edgargonzalez@gmail.com You can also visit http://www.lacaraoscura.com/2006/07/11/validates-unlike-plugin/ and post a comment. -- Edgar Gonz?lez Gonz?lez E-mail: edgargonzalez@gmail.com http://vp.com.ve http://lacaraoscura.com http://rubycorner.com --
Edgar Gonzalez wrote:> Validates Unlike Plugin (v 0.1) > =======================> > Validates Unlike plugin validates that the value of the specified > attribute doesn''t match against the regular expression provided >How does this differ from validates_exclusion_of? Craig -- Posted via http://www.ruby-forum.com/.
validates_exclusion_of works with an enumerable object, not with a RegExp. In some cases negate a RegExp is not easy, so validates_format_of is not an option. Regards On 7/12/06, Craig <craig@email.com> wrote:> Edgar Gonzalez wrote: > > Validates Unlike Plugin (v 0.1) > > =======================> > > > Validates Unlike plugin validates that the value of the specified > > attribute doesn''t match against the regular expression provided > > > > How does this differ from validates_exclusion_of? > > Craig > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Edgar Gonz?lez Gonz?lez E-mail: edgargonzalez@gmail.com http://vp.com.ve http://lacaraoscura.com http://rubycorner.com --
Posted at http://agilewebdevelopment.com/plugins/validates_unlike :) -- Benjamin Curtis http://www.bencurtis.com/ http://www.tesly.com/ -- Collaborative test case management http://www.agilewebdevelopment.com/ -- Resources for the Rails community On Jul 11, 2006, at 4:57 PM, Edgar Gonzalez wrote:> Validates Unlike Plugin (v 0.1) > =======================> > Validates Unlike plugin validates that the value of the specified > attribute doesn''t match against the regular expression provided > > Class Contact < ActiveRecord::Base > validates_unlike :comment, :with =>/html|http|onclick|onmouseover/ , > :message => "comment can''t include: href,http,onclick,onmouseover." > end > > > =======================> > Bug reports and feedback are always welcome. Please send them to > edgargonzalez@gmail.com > You can also visit > http://www.lacaraoscura.com/2006/07/11/validates-unlike-plugin/ and > post a comment. > > > -- > Edgar Gonz?lez Gonz?lez > E-mail: edgargonzalez@gmail.com > http://vp.com.ve > http://lacaraoscura.com > http://rubycorner.com > -- > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060712/fe829ba9/attachment.html
Thanks benjamin On 7/12/06, Benjamin Curtis <rails@bencurtis.com> wrote:> > Posted at > http://agilewebdevelopment.com/plugins/validates_unlike :) > > > > -- > Benjamin Curtis > http://www.bencurtis.com/ > http://www.tesly.com/ -- Collaborative test case management > http://www.agilewebdevelopment.com/ -- Resources for the > Rails community > > > > > > On Jul 11, 2006, at 4:57 PM, Edgar Gonzalez wrote: > > > Validates Unlike Plugin (v 0.1) > =======================> > Validates Unlike plugin validates that the value of the specified > attribute doesn''t match against the regular expression provided > > Class Contact < ActiveRecord::Base > validates_unlike :comment, :with > =>/html|http|onclick|onmouseover/ , > :message => "comment can''t include: href,http,onclick,onmouseover." > end > > > =======================> > Bug reports and feedback are always welcome. Please send them to > edgargonzalez@gmail.com > You can also visit > http://www.lacaraoscura.com/2006/07/11/validates-unlike-plugin/ > and > post a comment. > > > -- > Edgar Gonz?lez Gonz?lez > E-mail: edgargonzalez@gmail.com > http://vp.com.ve > http://lacaraoscura.com > http://rubycorner.com > -- > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Edgar Gonz?lez Gonz?lez E-mail: edgargonzalez@gmail.com http://vp.com.ve http://lacaraoscura.com http://rubycorner.com --
Seemingly Similar Threads
- Problem with GetText 1.6.0 - undefined method ''N_''
- FeedValidator :: validating feeds RSS or ATOM
- How to spec routes for a resource nested in multiples resources?
- Specs don''t find modules when using the secure_actions or ssl_requirement plugin
- Switchtower different svn repo urls from my local box and my shared hosting