Class: Fluffery::Forms::Validation::Presence
- Defined in:
- lib/fluffery/forms/validation/validators.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
#add_html_attributes, #attribute_format_validator, #attribute_required?, #default_messages_for, #errors_for?, #initialize, #options_require_validation?, #validators_for, #validators_for?
Constructor Details
This class inherits a constructor from Fluffery::Forms::Validation::Base
Class Method Details
.create(attribute, options) ⇒ Object
6 7 8 9 |
# File 'lib/fluffery/forms/validation/validators.rb', line 6 def self.create(attribute ,) .merge!('required' => 'required') unless .has_key?('required') && ['required'] === false end |