class ActiveModel::Validations::WithSchemaValidator
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/password_schema_validator/with_schema_validator.rb, line 8 def initialize(options) filtered_options = filter_options(options) validate_schema(filtered_options) super end
Public Instance Methods
filter_options(options)
click to toggle source
# File lib/password_schema_validator/with_schema_validator.rb, line 19 def filter_options(options) options.except(:attributes, :class) end
validate_each(record, attr_name, value)
click to toggle source
# 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