Version: current

# Class ValidationException

Exception thrown by `DataObject`::write if validation fails. By throwing an exception rather than a user error, the exception can be caught in unit tests and as such can be used as a successful test.

  Exception
  ValidationException

Package: sapphire\validation
Located at sapphire/core/ValidationException.php

## Methods summary

`public` | # `__construct( mixed $result = null, mixed $message = null, mixed $code = 0 )` #### Overrides `Exception::__construct`
`public` | # `getResult( )`

### Methods inherited from Exception

`__toString()`, `__wakeup()`, `getCode()`, `getFile()`, `getLine()`, `getMessage()`, `getPrevious()`, `getTrace()`, `getTraceAsString()`

### Magic methods summary

## Properties summary

`protected {@link` | $result | # ValidationResult} or string ValidationResult} or string

### Properties inherited from Exception

`$code`, `$file`, `$line`, `$message`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -