All Projects → DavyJonesLocker → Client_side_validations Simple_form

DavyJonesLocker / Client_side_validations Simple_form

Licence: mit
Simple Form plugin for ClientSideValidations

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Client side validations Simple form

Awesome Rails
A curated list of awesome things related to Ruby on Rails
Stars: ✭ 2,787 (+1042.21%)
Mutual labels:  rails
Docker Registry Browser
🐳 Web Interface for the Docker Registry HTTP API V2 written in Ruby on Rails.
Stars: ✭ 239 (-2.05%)
Mutual labels:  rails
Mercury
Mercury Editor: The Rails WYSIWYG editor that allows embedding full page editing capabilities directly inline.
Stars: ✭ 2,629 (+977.46%)
Mutual labels:  rails
Stimulus Components
A modern Stimulus library delivering common JavaScript behaviors with a bunch of customizable controllers.
Stars: ✭ 234 (-4.1%)
Mutual labels:  rails
Generate
A new command line tool and developer framework for scaffolding out GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.
Stars: ✭ 238 (-2.46%)
Mutual labels:  rails
Rack Reducer
Declaratively filter data via URL params, in any Rack app, with any ORM.
Stars: ✭ 241 (-1.23%)
Mutual labels:  rails
Graphql Ruby
GraphQL Ruby example for How To GraphQL
Stars: ✭ 231 (-5.33%)
Mutual labels:  rails
Action cable client
A ruby client for interacting with Rails' ActionCable. -- Maintainers Wanted.
Stars: ✭ 245 (+0.41%)
Mutual labels:  rails
Gaffe
💥 Gaffe handles Rails error pages in a clean, simple way.
Stars: ✭ 238 (-2.46%)
Mutual labels:  rails
Acts As Messageable
Gem that allows communication between the models.
Stars: ✭ 242 (-0.82%)
Mutual labels:  rails
File validators
Adds file validators to ActiveModel.
Stars: ✭ 235 (-3.69%)
Mutual labels:  rails
Api on rails
Learn best practices to build an API using Ruby on Rails 5/6
Stars: ✭ 236 (-3.28%)
Mutual labels:  rails
Jsonapi Rails
Rails gem for fast jsonapi-compliant APIs.
Stars: ✭ 242 (-0.82%)
Mutual labels:  rails
Client side validations
Client Side Validations made easy for Ruby on Rails
Stars: ✭ 2,589 (+961.07%)
Mutual labels:  rails
Stimulus Flatpickr
A modest, yet powerful wrapper of Flatpickr 📆 for Stimulus
Stars: ✭ 243 (-0.41%)
Mutual labels:  rails
Operationcode old site
Our open source website. We're on a mission to help the military community learn software development, enter the tech industry, and code the future.
Stars: ✭ 231 (-5.33%)
Mutual labels:  rails
Wreeto official
Wreeto is an open source note-taking, knowledge management and wiki system.
Stars: ✭ 241 (-1.23%)
Mutual labels:  rails
Simonsays
💂 Simple, declarative, role-based access control system for Rails and Ruby
Stars: ✭ 245 (+0.41%)
Mutual labels:  rails
Apitome
Apitome: /iˈpitəmē/ An API documentation presentation layer for RSpec API Documentation output.
Stars: ✭ 244 (+0%)
Mutual labels:  rails
Sample apps
Railsチュートリアルの各章が終わった状態を集めたリポジトリです。
Stars: ✭ 240 (-1.64%)
Mutual labels:  rails

ClientSideValidations-SimpleForm

Gem Version npm version SemVer Build Status Maintainability Coverage Status

Simple Form plugin for ClientSideValidations

Installation

In your Gemfile add the following:

gem 'simple_form'
gem 'client_side_validations'
gem 'client_side_validations-simple_form'

Order matters here. simple_form and client_side_validations need to be required before client_side_validations-simple_form.

Follow the remaining installation instructions for ClientSideValidations

JavaScript file

Instructions depend on your technology stack.

When using Webpacker

Make sure that you are requiring jQuery and Client Side Validations.

Add the following package:

yarn add @client-side-validations/simple-form

Then, according to the CSS framework and module system you are using, add one of the following lines to your app/javascript/packs/application.js pack, after '@client-side-validations/client-side-validations':

// No framework / Generic frameworks / Bootstrap 3 with `import` syntax
import '@client-side-validations/simple-form'

// Bootstrap 4 with `import` syntax
import '@client-side-validations/simple-form/dist/simple-form.bootstrap4'

// No framework / Generic frameworks / Bootstrap 3 with `require` syntax
require('@client-side-validations/simple-form')

// Bootstrap 4 with `require` syntax
require('@client-side-validations/simple-form/dist/simple-form.bootstrap4')

When using Sprockets

Make sure that you are requiring jQuery and Client Side Validations.

According to the web framework you are using, add one of the following lines to your app/assets/javascripts/application.js, after //= require rails.validations

// No framework / Generic frameworks / Bootstrap 3
//= require rails.validations.simple_form

// Bootstrap 4
//= require rails.validations.simple_form.bootstrap4

If you need to copy the asset files from the gem into your project, run:

rails g client_side_validations:copy_assets

Note: If you run copy_assets, you will need to run it again each time you update this project.

Usage

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

<%= simple_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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].