Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Utils/ErrorMessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/**
* trait ErrorMessageTrait
* @author inhere
* @package Inhere\Validate\Utils
*/
trait ErrorMessageTrait
Expand Down Expand Up @@ -304,7 +305,6 @@ public function firstError($onlyMsg = true)

/**
* 得到最后一个错误信息
* @author inhere
* @param bool $onlyMsg
* @return array|string
*/
Expand Down Expand Up @@ -383,8 +383,6 @@ public function setMessages(array $messages): self

/**
* 各个验证器的提示消息
* @author inhere
* @date 2015-09-27
* @param string|\Closure $validator 验证器
* @param string $field
* @param array $args
Expand Down
13 changes: 6 additions & 7 deletions src/Utils/UserAndContextValidatorsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ public function required(string $field, $value = null): bool
}

/**
* 如果指定的另一个字段( anotherField )值等于任何一个 value 时,此字段为 必填
* @from laravel
* 如果指定的另一个字段( anotherField )值等于任何一个 value 时,此字段为 必填 (refer laravel)
* @param string $field
* @param mixed $fieldVal
* @param string $anotherField
Expand All @@ -182,7 +181,7 @@ public function requiredIf(string $field, $fieldVal, string $anotherField, $valu
}

/**
* 如果指定的另一个字段( anotherField )值等于任何一个 value 时,此字段为 不必填
* 如果指定的另一个字段( anotherField )值等于任何一个 value 时,此字段为 不必填(refer laravel)
* @param string $field
* @param mixed $fieldVal
* @param string $anotherField
Expand All @@ -203,7 +202,7 @@ public function requiredUnless(string $field, $fieldVal, string $anotherField, $
}

/**
* 如果指定的其他字段中的 任意一个 有值且不为空,则此字段为 必填
* 如果指定的其他字段中的 任意一个 有值且不为空,则此字段为 必填(refer laravel)
* @param string $field
* @param mixed $fieldVal
* @param array|string $fields
Expand All @@ -221,7 +220,7 @@ public function requiredWith(string $field, $fieldVal, $fields)
}

/**
* 如果指定的 所有字段 都有值且不为空,则此字段为 必填
* 如果指定的 所有字段 都有值且不为空,则此字段为 必填(refer laravel)
* @param string $field
* @param mixed $fieldVal
* @param array|string $fields
Expand All @@ -242,7 +241,7 @@ public function requiredWithAll(string $field, $fieldVal, $fields)
}

/**
* 如果缺少 任意一个 指定的字段值,则此字段为 必填
* 如果缺少 任意一个 指定的字段值,则此字段为 必填(refer laravel)
* @param string $field
* @param mixed $fieldVal
* @param array|string $fields
Expand All @@ -263,7 +262,7 @@ public function requiredWithout(string $field, $fieldVal, $fields)
}

/**
* 如果所有指定的字段 都没有 值,则此字段为 必填
* 如果所有指定的字段 都没有 值,则此字段为 必填(refer laravel)
* @from laravel
* @param string $field
* @param mixed $fieldVal
Expand Down