Class: DataMapper::Validate::LengthValidator

Class | DataMapper::Validate::LengthValidator
In: | lib/dm-validations/validators/length_validator.rb
Parent: | GenericValidator

### Methods

call new

### Public Class methods

new(field_name, options)

Initialize a length validator

@param [Symbol] field_name

      the name of the field to validate

@param [Hash] options

      the validator options

@return [undefined]

@api semipublic

### Public Instance methods

call(target)

Test the resource field for validity

@example when the resource field is valid

      validator.call(valid_resource)  # => true

@example when the resource field is not valid

      validator.call(invalid_resource)  # => false

@param [Resource] target

      the Resource to test

@return [Boolean]

      true if the field is valid, false if not

@api semipublic

[Validate]