A long-lived project that still receives updates
Mongoid Plugin for ClientSideValidations
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ClientSideValidations-Mongoid

Gem Version Build Status Maintainability Coverage Status

Mongoid plugin for ClientSideValidations

Installation

In your Gemfile add the following:

gem 'mongoid'
gem 'client_side_validations'
gem 'client_side_validations-mongoid'

Order matters here. Mongoid and ClientSideValidations need to be required before ClientSideValidations-Mongoid.

Follow the remaining installation instructions for ClientSideValidations

Usage

The usage is the same as ClientSideValidations, just pass validate: true to the form builder

<%= form_for @book, validate: true do |book| %>
  <%= book.input :name %>
<% end %>

Per-input options are done with :validate

<%= book.input :name, validate: { presence: true, uniqueness: false } %>

Authors

Brian Cardarella

Geremia Taglialatela

We are very thankful for the many contributors

Versioning

This gem follows Semantic Versioning

Want to help?

Please do! We are always looking to improve this gem. Please see our Contribution Guidelines on how to properly submit issues and pull requests.

Legal

DockYard, LLC © 2012-2021

@dockyard

Licensed under the MIT license