[ANN] validates_unlike plugin

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
[email protected]
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: [email protected]
http://vp.com.ve
http://lacaraoscura.com
http://rubycorner.com

Edgar G. 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

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 [email protected] wrote:

Craig


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Edgar González González
E-mail: [email protected]
http://vp.com.ve
http://lacaraoscura.com
http://rubycorner.com

Thanks benjamin

On 7/12/06, Benjamin C. [email protected] wrote:

http://www.agilewebdevelopment.com/ – Resources for the


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Edgar González González
E-mail: [email protected]
http://vp.com.ve
http://lacaraoscura.com
http://rubycorner.com

Posted at http://agilewebdevelopment.com/plugins/validates_unlike :slight_smile:


Benjamin C.
http://www.bencurtis.com/
http://www.tesly.com/ – Collaborative test case management
http://www.agilewebdevelopment.com/ – Resources for the Rails community

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs