/**
* Perform validation against given value
*
* @param $value
*
* @throws ValidationException
* @return $this
*/
protected function validate(&$value)
{
if ($this->str($value)->contains(',')) {
$value = $this->str($value)->replace(',', '.')->val();
}
$value = floatval($value);
if (!$this->isNumber($value)) {
$this->expected('number', gettype($value));
}
parent::validate($value);
return $this;
}