/**
  * Checks that the value doesn't exist in the database table.
  *
  * @access  public
  * @param   string   $input   Input
  * @param   string   $table   Table name
  * @param   string   $column  Column name
  * @param   string   $value   Allowed value
  * @return  boolean
  */
 public function validate($input, $table, $column, $value = null)
 {
     $query = $this->connectionManager->builder()->table($table)->where($column, '=', $input);
     if (!empty($value)) {
         $query->where($column, '!=', $value);
     }
     return $query->count() == 0;
 }
 /**
  * Validator.
  *
  * @access  public
  * @param   string   $input        Input
  * @param   string   $table        Table name
  * @param   string   $column       Column name
  * @param   array    $conditional  (optional) Query conditionals
  * @return  boolean
  */
 public function validate($input, $table, $column, $conditionals = [])
 {
     $query = $this->connectionManager->builder()->table($table)->where($column, '=', $input);
     // Additional clauses
     foreach ($conditionals as $conditional) {
         // Explode clauses
         list($field, $conditional, $value) = explode(' ', $conditional);
         // Perform query
         $query->where($field, $conditional, $value);
     }
     return $query->count() != 0;
 }
 /**
  * Checks that the value exists in the database table.
  *
  * @access  public
  * @param   string   $input   Input
  * @param   string   $table   Table name
  * @param   string   $column  Column name
  * @return  boolean
  */
 public function validate($input, $table, $column)
 {
     return $this->connectionManager->builder()->table($table)->where($column, '=', $input)->count() != 0;
 }