base-field-error.php
4 years ago
checkboxes-field-error.php
4 years ago
error-handler.php
4 years ago
media-field-error.php
4 years ago
number-field-error.php
4 years ago
repeater-field-error.php
4 years ago
text-field-error.php
4 years ago
textarea-field-error.php
4 years ago
wysiwyg-field-error.php
4 years ago
base-field-error.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Blocks\Modules\Fields_Errors; |
| 5 | |
| 6 | |
| 7 | abstract class Base_Field_Error { |
| 8 | |
| 9 | protected $name; |
| 10 | protected $message; |
| 11 | protected $params; |
| 12 | |
| 13 | abstract public function get_name(); |
| 14 | abstract public function get_title(); |
| 15 | |
| 16 | public function set_params( $params = array() ) { |
| 17 | $this->name = $params['name']; |
| 18 | $this->message = $params['message']; |
| 19 | $this->params = $params['params']; |
| 20 | } |
| 21 | |
| 22 | public function error() { |
| 23 | return 'This field is required.'; |
| 24 | } |
| 25 | |
| 26 | } |