This repository has been archived by the owner. It is now read-only.
[DEPRECATED] Programatically determine whether or not a piece of English text meets common-sense quality standards.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
generators/validates_text_content
lib
rails
tasks
test
MIT-LICENSE
README
Rakefile
install.rb
uninstall.rb

README

validates_text_content
======================

validates_text_content is a Rails plugin that provides an ActiveRecord validation for
determining whether or not a block of English text meets certain quality standards.

It is designed to help ease the moderation load associated with administering a community 
website and aims to provide instant feedback to users who might otherwise have their 
content deleted or edited by a moderator.

Examples
========

Rejects:
    "this comment has absolutely no capitalization."
    "This comment has no type of punctuation"
    "Fdkjd dk dkkjhd kjdhkjd kjdhdhdl alkasla lka alk"
    "THIS COMMENT IS ALL IN UPPERCASE. ME NO WANT!"
    "Thiscommenthasabsolutelynospacesthereisnowaythisisgood."
    "THIS COMMENT is MORE THAN 80% CAPITALS."
    "THIS pERSON hAS tHEIR cAPS-lOCK oN."
    
Accepts:
    "This is a very simple test comment."
    "Supercalifragilisticexpialadocious: a super long word!"
    "How many words can I think of that don't contain an 'e'?"
    
For more examples please see the test cases in 'test/validates_text_content_test.rb'.

Installation
============

    # To install using Git via script/plugin:
    ./script/plugin install git://github.com/aarongough/validates_text_content.git
    
    # To install using SVN via script/plugin:
    ./script/plugin install http://svn.github.com/aarongough/validates_text_content.git
    
    # If your application is not under version control you can still install using a SVN export:
    ./script/plugin install -e http://svn.github.com/aarongough/validates_text_content.git

Usage
=====

class Book < ActiveRecord::Base
  validates_text_content :title, :biography
end


Copyright (c) 2010 Aaron Gough (http://thingsaaronmade.com/), released under the MIT license