# Sandbox.SandboxSystemExtensions.CheckValidationAttributes

```csharp
static bool CheckValidationAttributes(System.Reflection.PropertyInfo prop, object obj, out string[] errors, string name = null)
```

Check all `T:System.ComponentModel.DataAnnotations.ValidationAttribute`s on this property, and get the error messages if there are any.

### Parameters

- `prop` (`System.Reflection.PropertyInfo`): The property whose arguments to test.
- `obj` (`object`): Instance of the object this property is of.
- `out errors` (`string[]`): If returned false, these will be the error messages to display.
- `name` (`string`), default `null`: Override the property name in error messages.

### Returns

`bool`: Returns true if all checks have passed or there is no attributes to test, false if there were errors.

Declared in [Sandbox.SandboxSystemExtensions](/api/Sandbox.SandboxSystemExtensions).
Assembly: `Sandbox.System`.
