public function setValueAttribute($value)
    {
        if (!$this->isValid($value)) {
            throw new InvalidValueException("The value in the field '" . get_class($this) . "' is invalid");
        }

        $this->attributes['value'] = $this->prepareValue($value);
    }
public function setValueAttribute($value)
    {
        if (!$this->isValid($value)) {
            throw new InvalidValueException("The value in the field '" . get_class($this) . "' is invalid");
        }

        $this->attributes['value'] = $this->prepareValue($value);
    }
public function setValueAttribute ( $ value ) { if ( ! $ this -> isValid ( $ value ) ) { throw new InvalidValueException ( "The value in the field '" . get_class ( $ this ) . "' is invalid" ) ; } $ this -> attributes [ 'value' ] = $ this -> prepareValue ( $ value ) ; }
Validate and set the value

@param  mixed  $value
Validate and set the value