---
name: "Validation::Class::Field"
section: "3pm"
platform: "linux"
package: "libvalidation-class-perl"
version: "7.70-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Validation::Class::Field"
---

# Validation::Class::Field(3pm)

Field Object for Validation::Class Classes

## NAME

Validation::Class::Field - Field Object for Validation::Class Classes

## VERSION

version 7.70

## SYNOPSIS

```
    package SomeClass;

    use Validation::Class;

    package main;

    my $class = SomeClass->new;

    ...

    my $field = $class->get_field('some_field_name');

    $field->apply_filters;

    $field->validate; # validate this only

    $field->errors->count; # field-level errors

    1;
```

## DESCRIPTION

Validation::Class::Field is responsible for field data handling in Validation::Class derived classes, performs functions at the field-level only.

This class automatically creates attributes for all acceptable field directives as listed under "DIRECTIVES" in Validation::Class::Prototype.

## ATTRIBUTES

### errors

The errors attribute is a Validation::Class::Errors object.

## METHODS

### new

```
    my $self = Validation::Class::Field->new({
        name => 'some_field_name'
    });
```

## AUTHOR

Al Newkirk \<anewkirk@ana.io\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Al Newkirk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
