jCheck Rails provide a ease way to generate jCheck code
to validate forms according to ActiveModel record validations.
Just configure your Gemfile with
You can easily download latest version of jcheck using the provided rake task:
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 %>
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
It’s highly recommended that you read the
jCheck documentation at
http://jcheck.net/documentation for a full
- Get messages from i18n and append automatically
- Don’t create validations for unavailable ones (like uniqueness validator)
- Generating field labels from Rails i18n
- Able to filter attributes to be reflected
- Added rake task for setup
- Initial Release
- Wilker Lucio (http://github.com/wilkerlucio/jcheck)
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
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.