Skip to content

kevin-glare/spacefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spacefix

Simple gem for validate and removing whitespace into string fields.

Installation

Add this line to your application's Gemfile:

gem 'spacefix'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spacefix

Usage

class Model < ApplicationRecord
  include Spacefix
  validate_spasefix :field_one, :field_two, validate: true, squish: false, message: 'Please removing excess whitespace'
end

squish, validate, message - optional

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kgoryachev/spacefix.

About

Whitespace validator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages