Sha256: 0fc6a8c9f1f5c757ca19ffeb0d8428be3f015325bac28d8184ec64f1880c9867

Contents?: true

Size: 189 Bytes

Versions: 11

Compression:

Stored size: 189 Bytes

Contents

class NumberField
  def validate(form, key)
    return unless form[key]
    return if form[key].is_numeric?
    form.invalid(key, NumberFieldError.new)
  end
end

class NumberFieldError
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
starapor-slippers-0.0.2 examples/forms/model/registration_rules/number_field.rb
starapor-slippers-0.0.3 examples/forms/model/registration_rules/number_field.rb
starapor-slippers-0.0.5 examples/forms/model/registration_rules/number_field.rb
starapor-slippers-0.0.6 examples/forms/model/registration_rules/number_field.rb
starapor-slippers-0.0.8 examples/forms/model/registration_rules/number_field.rb
starapor-slippers-0.0.9 examples/forms/model/registration_rules/number_field.rb
slippers-0.0.14 examples/forms/model/registration_rules/number_field.rb
slippers-0.0.13 examples/forms/model/registration_rules/number_field.rb
slippers-0.0.12 examples/forms/model/registration_rules/number_field.rb
slippers-0.0.11 examples/forms/model/registration_rules/number_field.rb
slippers-0.0.10 examples/forms/model/registration_rules/number_field.rb