/** * Numeric field */ public function numeric() { if ($this->field->isOfType('number')) { $this->field->step('any'); } else { $this->field->pattern('[+-]?\\d*\\.?\\d+'); } }