Class: ActiveModel::Validations::WithSchemaValidator
- Inherits:
-
EachValidator
- Object
- EachValidator
- ActiveModel::Validations::WithSchemaValidator
- Includes:
- SchemaHelperMethods
- Defined in:
- lib/password_schema_validator/with_schema_validator.rb
Constant Summary
Constants included from SchemaHelperMethods
SchemaHelperMethods::RESERVED_OPTIONS
Instance Method Summary collapse
- #filter_options(options) ⇒ Object
-
#initialize(options) ⇒ WithSchemaValidator
constructor
A new instance of WithSchemaValidator.
- #validate_each(record, attr_name, value) ⇒ Object
Methods included from SchemaHelperMethods
#allowed_special_chareters, #dictionary, #digits, #discarded_words, #invalid_key_error, #invalid_value_type, #lower_case, #match_against_schema, #max_len, #min_len, #special_charecters, #upper_case, #validate_attribute, #validate_schema
Methods included from ClassSpecifier
Constructor Details
#initialize(options) ⇒ WithSchemaValidator
8 9 10 11 12 13 |
# File 'lib/password_schema_validator/with_schema_validator.rb', line 8 def initialize() = () validate_schema() super end |
Instance Method Details
#filter_options(options) ⇒ Object
19 20 21 |
# File 'lib/password_schema_validator/with_schema_validator.rb', line 19 def () .except(:attributes, :class) end |
#validate_each(record, attr_name, value) ⇒ Object
15 16 17 |
# File 'lib/password_schema_validator/with_schema_validator.rb', line 15 def validate_each(record, attr_name, value) match_against_schema(record, attr_name, value) end |