public function apply($value, $type = self::TYPE_STRING, array $filters = array(), $title = null, $required = true)
    {
        $result = $this->validate($value, $type, $filters, $title, $required);

        if ($result->hasError()) {
            throw new ValidationException($result->getFirstError(), $title, $result);
        } elseif ($result->isSuccessful()) {
            return $result->getValue();
        }

        return null;
    }