Skip to content

sujrd/suj-kana-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KanaValidator

Adds methods to validate if your strings are composed of only kana, hiragana, katakana or kanji only.

Usage

class User < ActiveRecord::Base

validates_is_hiragana :name_hiragana, :allow_blank => true
validates_is_kanji :name_kanji

end

Available validators

validates_is_kana
validates_is_kanji
validates_is_hiragana
validates_is_katakana
validates_is_half_katakana

Options

allow_blank - Default to true
allow_nil   - Deafult to true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published