jCheck Rails

jCheck Rails provide a ease way to generate jCheck code to validate forms according to ActiveModel record validations.

Installation

Just configure your Gemfile with

gem 'jcheck_rails'

Basic Usage

You can easily download latest version of jcheck using the provided rake task:

rake jcheck:setup

This will download latest version of jcheck and will extract in correct directories for you. Them you just need to include files in your view layout.

With the library included, on your form views add the following:

<%= jcheck_for resource %>

Replace resource with the instance variable of the resource for form e.g. @user. This will use reflection, to detect the model validations and will convert these to jCheck.

It’s highly recommended that you read the jCheck documentation at http://jcheck.net/documentation for a full overview on jCheck.

TODO

  • Get messages from i18n and append automatically

Change Log

0.2.0

  • Added rake task for setup

0.1.1

  • Initial Release

Maintainers

  • Wilker Lucio (http://github.com/wilkerlucio/jcheck)

License

Copyright 2010 Wilker Lucio.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.