Adding validate handler to form API that will integrate with entity validator.

#22
This should be simplified to:
```php
if (empty($form['#entity']) || empty($form['#entity_type'])) {
```