FormKeeper::Japanese
This provides Japanese specific filters and constraints for formkeeper
Installation
Add this line to your application's Gemfile:
gem 'formkeeper-japanese'
And then execute:
$ bundle
Or install it yourself as:
$ gem install formkeeper-japanese
Usage
Synopsis
In your sinatra application with sinatra-formkeeper
require 'sinatra/formkeeper'
require 'formkeeper/japanese'
post '/entry' do
form do
field :yomigana, :present => true, :katakana => true, :length => 0..16 :filters => [:hiragana_to_katakana]
field :tel, :present => true, :int => true, :filters => [:zenkaku_to_hankaku]
end
end
Filters
- zenkaku_to_hankaku
- hankaku_to_zenkaku
- hiragana_to_katakana
- katakana_to_hiragana
Constraints
- kana
- hiragana
- katakana
See Also
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request