Skip to content

judgegem/judge-simple_form

Repository files navigation

judge-simple_form

Build status

This is an adapter gem which allows you to use Judge from within your Simple Form forms.

The current version supports Simple Form >= 3. For Simple Form 2 support use 'judge-simple_form', ~> '0.4'.

Usage

Do this in your Gemfile:

gem 'judge-simple_form'

Remember to setup Judge in your SimpleForm initializer. Put b.use :judge above b.use :input or b.use :input_label:

config.wrappers do |b|
  b.use :judge
end

Then add :validate => true to the input options in your views. That's all.

<%= simple_form_for(@user) do |f| %>
  <%= f.input :name, :validate => true %>
<% end %>

Judge

Judge is a client-side validation gem for Rails.

http://blog.joecorcoran.co.uk

About

SimpleForm adapter for Judge

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages