Module: SUJ::Rails::Validations

Defined in:
lib/suj/kana-validator/kana-validator.rb

Instance Method Summary collapse

Instance Method Details

#validates_is_half_katakana(*attr_names) ⇒ Object



48
49
50
# File 'lib/suj/kana-validator/kana-validator.rb', line 48

def validates_is_half_katakana(*attr_names)
  validate_japanese("half_katakana", *attr_names)
end

#validates_is_hiragana(*attr_names) ⇒ Object



40
41
42
# File 'lib/suj/kana-validator/kana-validator.rb', line 40

def validates_is_hiragana(*attr_names)
  validate_japanese("hiragana", *attr_names)
end

#validates_is_kana(*attr_names) ⇒ Object



52
53
54
# File 'lib/suj/kana-validator/kana-validator.rb', line 52

def validates_is_kana(*attr_names)
  validate_japanese("kana", *attr_names)
end

#validates_is_kanji(*attr_names) ⇒ Object



36
37
38
# File 'lib/suj/kana-validator/kana-validator.rb', line 36

def validates_is_kanji(*attr_names)
  validate_japanese("kanji", *attr_names)
end

#validates_is_katakana(*attr_names) ⇒ Object



44
45
46
# File 'lib/suj/kana-validator/kana-validator.rb', line 44

def validates_is_katakana(*attr_names)
  validate_japanese("katakana", *attr_names)
end