play.data.validation

## Class Error

- java.lang.Object
- - play.data.validation.Error

    public class Error
    extends java.lang.Object

A validation error.

### Constructor Summary

Constructors
Constructor and Description
`Error(java.lang.String key, java.lang.String message, java.lang.String[] variables)`
`Error(java.lang.String key, java.lang.String message, java.lang.String[] variables, int severity)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getKey()`
`java.lang.String` `getMessageKey()`
`int` `getSeverity()`
`java.lang.String` `message()`
`java.lang.String` `message(java.lang.String key)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Error

    public Error(java.lang.String key,
                 java.lang.String message,
                 java.lang.String[] variables)

#### Error

    public Error(java.lang.String key,
                 java.lang.String message,
                 java.lang.String[] variables,
                 int severity)

### Method Detail

#### message

    public java.lang.String message()

Returns:
  The translated message

#### getKey

    public java.lang.String getKey()

Returns:
  The field name

#### message

    public java.lang.String message(java.lang.String key)

Parameters:
  `key` - Alternate field name (default to java variable name)
Returns:
  The translated message

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getSeverity

    public int getSeverity()

#### getMessageKey

    public java.lang.String getMessageKey()