追加规则等信息

@param $rules
@param $message
@param $field
@return $this
327438
public function add($rules,$message,$field) {
        $this->rule = array_merge($this->rule,$rules);
        $this->message = array_merge($this->message, $message);
        $this->field = array_merge($this->field, $field);
        return $this;
    }
332220
public function message($ruleOrMessage, $message = null)
    {
        if (1 === func_num_args()) {
            $rule = $this->lastRule;
            $message = $ruleOrMessage;
        } else {
            $rule = $ruleOrMessage;
        }

        $this->options['messages'][$this->lastKey][$rule] = $message;

        return $this;
    }
1008541
protected function replaceRequiredIf($message, $attribute, $rule, $parameters)
	{
		$parameters[0] = $this->getAttribute($parameters[0]);

		return str_replace(array(':other', ':value'), $parameters, $message);
	}
819241
private function compound($field, $rules)
    {
        $out = [];
        if (is_array($rules)) {
            foreach ($rules as $operator => $value) {
                $out[] = json_encode([$field => [$operator => $value]]);
            }

            return $out;
        } elseif (is_a($rules, MultiFullTextFilter::class)) {
            $out[] = (string)$rules;

            return $out;
        }
        $out[] = json_encode([$field => $rules]);

        return $out;
    }
834930
public function setRulesFor($key, $rules)
    {
        if (is_array($rules) || is_string($rules))
            $this->_rules[$key] = $rules;

        return $this;
    }
1028575
function addRule($field, $callback) {
        if (isset($this->rules[$field])) {
            array_unshift($this->rules[$field], $callback);
        }

        return $this;
    }
1124625
public function getMessage($key, $rule, $message = null) {
        $label = isset($this->labels[$key]) ? $this->labels[$key] : $key;
        if (!is_null($message)) {
            return str_replace(':attribute', $label, $message);
        }
        if (isset($this->messages[$key.'.'.$rule])) {
            return $this->messages[$key.'.'.$rule];
        }
        return str_replace(':attribute', $label, $this->messages[$rule]);
    }
181141
public function addInstanceRule(string $name, callable $callback, string $message = null): self
    {
        static::assertRuleCallback($callback);

        $this->_instanceRules[$name] = $callback;
        $this->_instanceRuleMessage[$name] = $message;

        return $this;
    }
424605
protected function addError($field , $message) {
        if(array_key_exists($field, $this->errors)) {
            $this->errors[$field][] = $message;
        } else {
            $this->errors[$field] = [$message];
        }
        return $this;
    }
270602
public function addValidation(string $field, string $message)
    {
        $args = func_get_args();

        return $this->set('json', 'validation', ...$args);
    }
308350
public function add_rule($field, $rule) {

		if(!$rule instanceof \HybridLogic\Validation\Rule) return $this;

		if(!isset($this->labels[$field])) {
			$this->set_label($field, $this->humanize_field_name($field));
		}

		if(!isset($this->rules[$field])) $this->rules[$field] = array();
		$this->rules[$field][] = $rule;

		return $this;

	}
962873
public function append( $field, $rule = null )
	{
		if( is_array( $field ) ){
			foreach( $field as $key => $rule ){
				$this->append( $key, $rule );
			}
		} else{
			if( is_string( $rule ) ){
				$rule = explode( '|', $rule );
			}
			$this->append[$field] = $rule;
		}
		return $this;
	}
334273
public function addValidationMessage($rule, $message)
    {
        if (($pos = strpos($rule, ':')) !== false) {
            $rule = substr($rule, 0, $pos);
        }

        $this->validationMessages[$rule] = $message;

        return $this;
    }
35122
protected function validationResult($message, $field = null)
    {
        $error = ValidationResult::create()
            ->addFieldError($field, $message);
        return new ValidationException($error);
    }
445247
public function addRules(array $rules)
    {
        foreach ($rules as $rule) {
            if (is_array($rule)) {
                $this->addRules($rule);
            } else {
                $this->addRule($rule);
            }
        }

        return $this;
    }
804020
public function addRule(string $key, string $rule) : ValidatorInterface
    {
        $this->rules[$key] = $rule;

        return $this;
    }
1125474
public function addRule($regex, $target = null, $params = null)
    {
        $this->rules[] = array($regex, $target, $params);

        return $this;
    }