src/Schema/Validator.php
public static function getCreateErrors(array $data, array $errors = [])
    {
        if (!isset($data['singular']) || empty($data['singular'])) {
            $errors['singular'] = 'Singular is required';
        }

        if (!isset($data['plural']) || empty($data['plural'])) {
            $errors['plural'] = 'Plural is required';
        }

        if (!isset($data['name']) || empty($data['name'])) {
            $errors['name'] = 'Keyword is required';
        }

        if (!isset($data['fields']) || empty($data['fields'])) {
            $errors['fields'] = 'Fields is required';
        }

        if (isset($data['name'])) {
            $exists = false;
            try {
                $exists = Schema::i($data['name'])->getAll();
            } catch (Exception $e) {
            }

            if ($exists) {
                $errors['name'] = 'Schema already exists';
            }
        }

        return self::getOptionalErrors($data, $errors);
    }
public static function getCreateErrors(array $data, array $errors = [])
    {
        if (!isset($data['singular']) || empty($data['singular'])) {
            $errors['singular'] = 'Singular is required';
        }

        if (!isset($data['plural']) || empty($data['plural'])) {
            $errors['plural'] = 'Plural is required';
        }

        if (!isset($data['name']) || empty($data['name'])) {
            $errors['name'] = 'Keyword is required';
        }

        if (!isset($data['fields']) || empty($data['fields'])) {
            $errors['fields'] = 'Fields is required';
        }

        if (isset($data['name'])) {
            $exists = false;
            try {
                $exists = Schema::i($data['name'])->getAll();
            } catch (Exception $e) {
            }

            if ($exists) {
                $errors['name'] = 'Schema already exists';
            }
        }

        return self::getOptionalErrors($data, $errors);
    }
public static function getCreateErrors ( array $ data , array $ errors = [ ] ) { if ( ! isset ( $ data [ 'singular' ] ) || empty ( $ data [ 'singular' ] ) ) { $ errors [ 'singular' ] = 'Singular is required' ; } if ( ! isset ( $ data [ 'plural' ] ) || empty ( $ data [ 'plural' ] ) ) { $ errors [ 'plural' ] = 'Plural is required' ; } if ( ! isset ( $ data [ 'name' ] ) || empty ( $ data [ 'name' ] ) ) { $ errors [ 'name' ] = 'Keyword is required' ; } if ( ! isset ( $ data [ 'fields' ] ) || empty ( $ data [ 'fields' ] ) ) { $ errors [ 'fields' ] = 'Fields is required' ; } if ( isset ( $ data [ 'name' ] ) ) { $ exists = false ; try { $ exists = Schema :: i ( $ data [ 'name' ] ) -> getAll ( ) ; } catch ( Exception $ e ) { } if ( $ exists ) { $ errors [ 'name' ] = 'Schema already exists' ; } } return self :: getOptionalErrors ( $ data , $ errors ) ; }
Returns Table Create Errors

@param *array $data
@param array  $errors

@return array
Returns Table Create Errors