# Sandbox.Internal.TypeLibrary.CheckValidationAttributes

## Overload 1

```csharp
bool CheckValidationAttributes(T obj)
```

Check if all properties of this class instance pass their `T:System.ComponentModel.DataAnnotations.ValidationAttribute`.

### Parameters

- `obj` (`T`): Object to test.

### Returns

`bool`: True if all properties pass their validity checks (or if there are no checks), false otherwise.

## Overload 2

```csharp
bool CheckValidationAttributes(T obj, out string[] errors)
```

Check if all properties of this class instance pass their `T:System.ComponentModel.DataAnnotations.ValidationAttribute`.

### Parameters

- `obj` (`T`): Object to test.
- `out errors` (`string[]`): string array of first invalid obj property error

### Returns

`bool`: True if all properties pass their validity checks (or if there are no checks), false otherwise.

Declared in [Sandbox.Internal.TypeLibrary](/api/Sandbox.Internal.TypeLibrary).
Assembly: `Sandbox.Reflection`.
