I have a code like this:
public function beforeValidationOnCreate() { if(empty($this->value)){ $this->value=false; } }
but it doesn't work, it says that value is required
Yes, it works, you can see the unit-tests passing for that method here:
Does it still fail if you set $this->value to a valid value?
$this->value