Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RecordExists.php
Go to the documentation of this file.
1 <?php
25 #require_once 'Zend/Validate/Db/Abstract.php';
26 
37 {
38  public function isValid($value)
39  {
40  $valid = true;
41  $this->_setValue($value);
42 
43  $result = $this->_query($value);
44  if (!$result) {
45  $valid = false;
46  $this->_error(self::ERROR_NO_RECORD_FOUND);
47  }
48 
49  return $valid;
50  }
51 }
_error($messageKey, $value=null)
Definition: Abstract.php:284
$value
Definition: gender.phtml:16