Ruby is fun to learn and work with. It’s also a very high-level language, meaning instead of you doing everything manually, Ruby handles all the fine-print details and abstracts it away. It’s so easy that you can build almost anything from scratch using Ruby. We also have a thriving community of Ruby developers, thanks to which we have various unique open-source libraries for various use cases. For processes like form validation, using these Ruby on Rails libraries, you can ensure that the input data is consistent and in the correct format.
Here we list down some of the best open-source form validation libraries in Ruby. Formstatic at its core is a Rails FormBuilder DSL. It has been developed with the goal to help web developers create semantically rich form fields and readily stylable HTML form validations for your Rails applications. Simple Form with nearly 8k stars on Github makes Rails forms easy to handle. It inherits most of its DSL from Formstatic and aims to be flexible while helping you handle powerful components as you define the layout of your form. We also have a library called Client-Side Validations which does exactly what you think it does. It automatically extracts and applies validation rules defined on the server-side to the client and can validate nested fields as well, all the while offering browser-wide compliancy.
simple_formby heartcombo
Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.
simple_formby heartcombo
Ruby 8102 Version:v5.2.0 License: Permissive (MIT)
formtasticby formtastic
A Rails form builder plugin with semantically rich and accessible markup.
formtasticby formtastic
Ruby 5173 Version:Current License: Permissive (MIT)
cocoonby nathanvda
Dynamic nested forms using jQuery made easy; works with formtastic, simple_form or default forms
cocoonby nathanvda
Ruby 3072 Version:Current License: Permissive (MIT)
client_side_validationsby DavyJonesLocker
Client Side Validations made easy for Ruby on Rails
client_side_validationsby DavyJonesLocker
Ruby 2643 Version:Current License: Permissive (MIT)
axlsxby randym
xlsx generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine.
axlsxby randym
Ruby 2606 Version:Current License: Permissive (MIT)
nested_formby ryanb
Rails plugin to conveniently handle multiple models in a single form.
nested_formby ryanb
Ruby 1804 Version:Current License: Permissive (MIT)
identity_cacheby Shopify
IdentityCache is a blob level caching solution to plug into Active Record. Don't #find, #fetch!
identity_cacheby Shopify
Ruby 1849 Version:Current License: Permissive (MIT)
bootstrap_formby bootstrap-ruby
Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
bootstrap_formby bootstrap-ruby
Ruby 1587 Version:v5.1.0 License: Permissive (MIT)
validates_timelinessby adzap
Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
validates_timelinessby adzap
Ruby 1535 Version:Current License: Permissive (MIT)
mutationsby cypriss
Compose your business logic into commands that sanitize and validate input.
mutationsby cypriss
Ruby 1375 Version:Current License: Permissive (MIT)
json-schemaby ruby-json-schema
Ruby JSON Schema Validator
json-schemaby ruby-json-schema
Ruby 1256 Version:Current License: Permissive (MIT)
cocoapods-binaryby leavez
integrate pods in form of prebuilt frameworks conveniently, reducing compile time
cocoapods-binaryby leavez
Ruby 1253 Version:v0.4.4 License: Permissive (MIT)
dry-validationby dry-rb
Validation library with type-safe schemas and rules
dry-validationby dry-rb
Ruby 1263 Version:v1.10.0 License: Permissive (MIT)
truemailby truemail-rb
🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.
truemailby truemail-rb
Ruby 973 Version:v3.0.8 License: Permissive (MIT)
mail_formby heartcombo
Send e-mail straight from forms in Rails with I18n, validations, attachments and request information.
mail_formby heartcombo
Ruby 849 Version:v1.9.0 License: Permissive (MIT)
phonelibby daddyz
Ruby gem for phone validation and formatting using google libphonenumber library data
phonelibby daddyz
Ruby 966 Version:v0.8.1 License: Permissive (MIT)
rails_paramby nicolasblanco
Parameter Validation & Type Coercion for Rails
rails_paramby nicolasblanco
Ruby 822 Version:v1.3.0 License: Others (Non-SPDX)
awesome_botby dkhamsing
:white_check_mark: Validate links in awesome projects
awesome_botby dkhamsing
Ruby 787 Version:Current License: Permissive (MIT)
active_storage_validationsby igorkasyanchuk
Do it like => validates :photos, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 500.kilobytes }, limit: { min: 1, max: 3 }, aspect_ratio: :landscape, dimension: { width: { in: 800..1600 }
active_storage_validationsby igorkasyanchuk
Ruby 891 Version:1.0.4 License: Permissive (MIT)
formotionby clayallsopp
Making iOS Forms insanely great with RubyMotion
formotionby clayallsopp
Ruby 622 Version:Current License: Others (Non-SPDX)
awesome-phalconby phalcon
A curated list of awesome Phalcon libraries and resources
awesome-phalconby phalcon
Ruby 594 Version:Current License: Permissive (MIT)
email_validatorby K-and-R
An email validator for Rails.
email_validatorby K-and-R
Ruby 608 Version:Current License: Permissive (MIT)
name_of_personby basecamp
Presenting names of people in full, familiar, abbreviated, and initialized forms (but without titulation etc)
name_of_personby basecamp
Ruby 571 Version:Current License: Permissive (MIT)
Multi-fetch Fragments makes rendering and caching a collection of template partials easier and faster.
Ruby 547 Version:Current License: Permissive (MIT)
global_phoneby sstephenson
Parse, validate, and format phone numbers in Ruby using Google's libphonenumber database
global_phoneby sstephenson
Ruby 546 Version:Current License: Permissive (MIT)
sinatra-paramby mattt
Parameter Validation & Type Coercion for Sinatra
sinatra-paramby mattt
Ruby 516 Version:Current License: Permissive (MIT)
link_thumbnailerby gottfrois
Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview.
link_thumbnailerby gottfrois
Ruby 496 Version:Current License: Permissive (MIT)
phony_railsby joost
This Gem adds useful methods to your Rails app to validate, display and save phone numbers. It uses the super awesome Phony gem (https://github.com/floere/phony).
phony_railsby joost
Ruby 537 Version:Current License: Permissive (MIT)
fit-commitby m1foley
A Git hook to validate your commit messages based on community standards.
fit-commitby m1foley
Ruby 468 Version:v3.7.0 License: Permissive (MIT)
valid_email2by micke
ActiveModel validation for email. Including MX lookup and disposable email blacklist
valid_email2by micke
Ruby 515 Version:Current License: Permissive (MIT)
validates_urlby perfectline
URL Validation for Rails
validates_urlby perfectline
Ruby 543 Version:Current License: Permissive (MIT)
phoneby carr
Ruby library for phone number parsing, validation and formatting
phoneby carr
Ruby 370 Version:Current License: Others (Non-SPDX)
validates_email_format_ofby validates-email-format-of
Validate e-mail addreses against RFC 2822 and RFC 3696 with this Ruby on Rails plugin and gem.
validates_email_format_ofby validates-email-format-of
Ruby 366 Version:Current License: Permissive (MIT)