Skip to content

Commit 21e8019

Browse files
committed
update
1 parent 0d87cdf commit 21e8019

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ValidationTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function addValidator($name, \Closure $callback, $msg = '')
272272
$this->_validators[$name] = $callback;
273273

274274
if ($msg) {
275-
$this->defaultMessages[$name] = $msg;
275+
$this->_defaultMessages[$name] = $msg;
276276
}
277277

278278
return $this;
@@ -384,7 +384,7 @@ public function lastError($onlyMsg=true)
384384
* (过滤器)默认的错误提示信息
385385
* @return array
386386
*/
387-
public $defaultMessages = [
387+
private $_defaultMessages = [
388388
'int' => '{attr} must be an integer!',
389389
'number' => '{attr} must be an integer greater than 0!',
390390
'bool' => '{attr} must be is boolean!',
@@ -407,7 +407,7 @@ public function lastError($onlyMsg=true)
407407

408408
public function getMessages()
409409
{
410-
return array_merge($this->defaultMessages, $this->messages());
410+
return array_merge($this->_defaultMessages, $this->messages());
411411
}
412412

413413
/**

0 commit comments

Comments
 (0)