Validates the table definition
@private
189925
function validateTableDefinition(tableDefinition) {
    // Do basic table name validation and leave the rest to the store
    Validate.notNull(tableDefinition, 'tableDefinition');
    Validate.isObject(tableDefinition, 'tableDefinition');

    Validate.isString(tableDefinition.name, 'tableDefinition.name');
    Validate.notNullOrEmpty(tableDefinition.name, 'tableDefinition.name');

    // Validate the specified column types and check for duplicate columns
    var columnDefinitions = tableDefinition.columnDefinitions,
        definedColumns = {};
    
    Validate.isObject(columnDefinitions);
    Validate.notNull(columnDefinitions);

    for (var columnName in columnDefinitions) {

        Validate.isString(columnDefinitions[columnName], 'columnType');
        Validate.notNullOrEmpty(columnDefinitions[columnName], 'columnType');

        if (definedColumns[columnName.toLowerCase()]) {
            throw new Error('Duplicate definition for column ' + columnName + '" in table "' + tableDefinition.name + '"');
        }

        definedColumns[columnName.toLowerCase()] = true;
    }
}
737705
function validateObject(node, schema, key) {
    if (typeof node == "object") {
      try {
        validateModel(node, schema[SCHEMADATA]);
      } catch (e) {
        throw new ValidationException(e.message + " at " + key + ".");
      }
    } else {
      throw new ValidationException("Expected object for " + key);
    }
  }
476983
protected function hasValidTable()
	{
		return (isset($this->table) && count($this->table['rows']) > 2 && $this->isValidSeparator($this->table['rows'][1]['line']));
	}
1076801
@Override
    protected void validate(List<TableInfo> tableInfos)
    {
        for (TableInfo tableInfo : tableInfos)
        {
            try
            {
                if (tableAPI.getTable(tableInfo.getTableName()) == null)
                {
                    logger.error("No table found for " + tableInfo.getTableName());
                    throw new SchemaGenerationException("No table found for " + tableInfo.getTableName());
                }
            }
            catch (FaultException e)
            {
                logger.error("Error while getting table " + tableInfo.getTableName() + ". Caused By: ", e);
                throw new SchemaGenerationException(e, "Error while getting table " + tableInfo.getTableName()
                        + ". Caused By: ");
            }
        }
    }
1341133
def _validate_input(self, table: pd.DataFrame, failed_only=False) -> pd.DataFrame:
        """"""
        return self._do_validation_set(
            table=table,
            columns=self.input_columns,
            validation_type="input",
            failed_only=failed_only,)
272302
function validateTableConfig(obj) {  
  /** If configuration has missing or invalid 'tableName' configuration, throw error */
  if ( typeof obj.tableName !== `string` || !obj.tableName.match(/^[a-z_]+$/) )
    throw new Error(`ezobjects.validateTableConfig(): Configuration has missing or invalid 'tableName', must be string containing characters 'a-z_'.`);

  validateClassConfig(obj);
}
75193
function autoValidate(object) {
  const seq = (object) ? object.seq : undefined;
  const action = (object) ? object.action : undefined;

  const schema = identifySchema(object)

  if (schema) {
    const {error, value} = validate(object, schema);

    if (error) {
      return { isValid: false, seq, action, error };
    } else {
      return { isValid: true, seq, action, value };
    }
  } else {
    return { isValid: false, seq, action,
      error: new Error('No matching schema found.') };
  }
}
593412
void validate() {
        validateCassandraParams();

        if (pageSize <= 0) {
            throw new IllegalArgumentException("pageSize cannot be zero");
        }

        

        validateConsistencyLevels();

        TableMetadata tableMetadata = fetchTableMetadata();

        validateTableMetadata(tableMetadata);
        validateAdditionalFilters(tableMetadata);

        if (!(this.isBisectModeSet && this.isSplitModeSet)) {
            if (this.isBisectModeSet) {
                if (this.bisectFactor != Constants.DEFAULT_BISECT_FACTOR
                        && !this.checkIsPowerOfTwo(this.bisectFactor)) {
                    throw new IllegalArgumentException(
                            "Bisect factor should be greater than zero and a power of 2");
                }
            } else if (this.isSplitModeSet) {
                if (this.splitSize <= 0) {
                    throw new IllegalArgumentException(
                            "The split size must be a positve integer");
                }
            } else {
                throw new IllegalArgumentException(
                        "One split mode must be defined, please choose between Split or Bisect");
            }
        } else {
            throw new IllegalArgumentException(
                    "Only one split mode can be defined, please choose between Split or Bisect");
        }
    }
690896
function validateKeyword(definition, throwError) {
  validateKeyword.errors = null;
  var v = this._validateKeyword = this._validateKeyword
                                  || this.compile(definitionSchema, true);

  if (v(definition)) return true;
  validateKeyword.errors = v.errors;
  if (throwError)
    throw new Error('custom keyword definition is invalid: '  + this.errorsText(v.errors));
  else
    return false;
}
60908
private function validateTableAndCol ($table, $columns) {
        if (!$this->isValidTable($table)) {
            return false;
        }
        
        foreach ($columns as $column) {
            if (!$this->isValidColumn($table, $column)) {
                return false;
            }
        }

        return true;
    }
756574
function handleTag_table() {
    if ($this->parser->isStartTag) {
      # check if upcoming table can be converted
      if ($this->keepHTML) {
        if (preg_match($this->tableLookaheadHeader, $this->parser->html, $matches)) {
          # header seems good, now check body
          # get align & number of cols
          preg_match_all('#<th(?:\s+align=("|\')(left|right|center)\1)?\s*>#si', $matches[0], $cols);
          $regEx = '';
          $i = 1;
          $aligns = array();
          foreach ($cols[2] as $align) {
            $align = strtolower($align);
            array_push($aligns, $align);
            if (empty($align)) {
              $align = 'left'; # default value
            }
            $td = '\s+align=("|\')'.$align.'\\'.$i;
            $i++;
            if ($align == 'left') {
              # look for empty align or left
              $td = '(?:'.$td.')?';
            }
            $td = '<td'.$td.'\s*>';
            $regEx .= $td.$this->tdSubstitute;
          }
          $regEx = sprintf($this->tableLookaheadBody, $regEx);
          if (preg_match($regEx, $this->parser->html, $matches, null, strlen($matches[0]))) {
            # this is a markdownable table tag!
            $this->table = array(
              'rows' => array(),
              'col_widths' => array(),
              'aligns' => $aligns,
            );
            $this->row = 0;
          } else {
            # non markdownable table
            $this->handleTagToText();
          }
        } else {
          # non markdownable table
          $this->handleTagToText();
        }
      } else {
        $this->table = array(
          'rows' => array(),
          'col_widths' => array(),
          'aligns' => array(),
        );
        $this->row = 0;
      }
    } else {
      # finally build the table in Markdown Extra syntax
      $separator = array();
      # seperator with correct align identifikators
      foreach($this->table['aligns'] as $col => $align) {
        if (!$this->keepHTML && !isset($this->table['col_widths'][$col])) {
          break;
        }
        $left = ' ';
        $right = ' ';
        switch ($align) {
          case 'left':
            $left = ':';
            break;
          case 'center':
            $right = ':';
            $left = ':';
          case 'right':
            $right = ':';
            break;
        }
        array_push($separator, $left.str_repeat('-', $this->table['col_widths'][$col]).$right);
      }
      $separator = '|'.implode('|', $separator).'|';

      $rows = array();
      # add padding
      array_walk_recursive($this->table['rows'], array(&$this, 'alignTdContent'));
      $header = array_shift($this->table['rows']);
      array_push($rows, '| '.implode(' | ', $header).' |');
      array_push($rows, $separator);
      foreach ($this->table['rows'] as $row) {
        array_push($rows, '| '.implode(' | ', $row).' |');
      }
      $this->out(implode("\n".$this->indent, $rows));
      $this->table = array();
      $this->setLineBreaks(2);
    }
  }
352658
def validate_request_table(self, request):
        '''
        
        '''
        if self.batch_table:
            if self.get_request_table(request) != self.batch_table:
                raise AzureBatchValidationError(_ERROR_INCORRECT_TABLE_IN_BATCH)
        else:
            self.batch_table = self.get_request_table(request)
103276
def validate(ctx, schema, all_schemata):
    """"""

    database = ctx.obj['db']

    if schema is None:
        if all_schemata is False:
            log('No schema given. Read the help', lvl=warn)
            return
        else:
            schemata = database.objectmodels.keys()
    else:
        schemata = [schema]

    for schema in schemata:
        try:
            things = database.objectmodels[schema]
            with click.progressbar(things.find(), length=things.count(),
                                   label='Validating %15s' % schema) as object_bar:
                for obj in object_bar:
                    obj.validate()
        except Exception as e:

            log('Exception while validating:',
                schema, e, type(e),
                '\n\nFix this object and rerun validation!',
                emitter='MANAGE', lvl=error)

    log('Done')
306587
private function validate()
    {
        if (!$this->table) {
            throw new BatchInsertException('Batch Table must be defined');
        }

        $requiredCount = count($this->rows);

        if ($requiredCount == 0) {
            throw new BatchInsertException('Batch Rows cannot be empty');
        }

        foreach ($this->values as $value) {
            if (count($value) !== $requiredCount) {
                throw new BatchInsertException('Batch Values must match the same column count of ' . $requiredCount);
            }
        }
    }
376418
def validate(self):
        """"""
        validate_rows_length(self.data, self.columns, exception=self.error)
        validate_categories_equal_entities(self.categories, self.entities,
                                           exception=self.error)
        if self.square:
            validate_square(self.data, exception=self.error)
736532
private void validateTable(TableDefinition tableDef) {
        // No options are currently allowed:
        for (String optName : tableDef.getOptionNames()) {
            Utils.require(false, "Unknown option for OLAPService table: " + optName);
        }
        
        for (FieldDefinition fieldDef : tableDef.getFieldDefinitions()) {
            validateField(fieldDef);
        }
    }
740651
@Override
    protected void validate(List<TableInfo> tableInfos)
    {
        List listTables = r.db(databaseName).tableList().run(connection);

        for (TableInfo tableInfo : tableInfos)
        {
            try
            {
                if (!listTables.contains(tableInfo.getTableName()))
                {
                    throw new SchemaGenerationException("Table: " + tableInfo.getTableName() + " does not exist ");
                }
            }
            catch (Exception e)
            {
                logger.error("Error while validating tables, Caused by: " + e.getMessage());
                throw new KunderaException("Error while validating tables, Caused by: " + e.getMessage());
            }
        }
    }