Improve delivery form validation

This commit is contained in:
Julius 2013-06-19 11:21:55 +02:00
parent 0b81ba97b9
commit bf32e72414
4 changed files with 23 additions and 7 deletions

View file

@ -44,6 +44,21 @@ SimpleForm.setup do |config|
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
b.use :error, :wrap_with => { :tag => :span, :class => :error }
end
config.wrappers :intable, :class => 'control-group',
:error_class => :error do |b|
b.use :html5
b.use :placeholder
b.optional :maxlength
b.optional :pattern
b.optional :min_max
b.optional :readonly
b.use :input
b.use :hint
b.use :error, :wrap_with => { :tag => :span, :class => 'help-inline' }
end
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :default