Наследование: implements Stevemo\Cpanel\Services\Validation\ValidableInterface
Пример #1
0
 /**
  * Test if validation passes before update
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @return bool
  */
 public function validForUpdate()
 {
     if (empty($this->data['password']) and empty($this->data['password_confirmation'])) {
         unset($this->rules['password']);
         unset($this->data['password']);
     }
     return parent::passes();
 }
Пример #2
0
 /**
  * Test if validation passes before update
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @return bool
  */
 public function validForUpdate()
 {
     $this->rules['name'] .= ',name,' . $this->data['id'];
     return parent::passes();
 }