Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 483 Bytes

README.rdoc

File metadata and controls

26 lines (17 loc) · 483 Bytes

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