public function validate($value)
    {
        return in_array($value, $this->choices) ? Ok::unit() : Error::unit([ Error::INVALID_CHOICE ]);
    }
public function validate($value)
    {
        return in_array($value, $this->choices) ? Ok::unit() : Error::unit([ Error::INVALID_CHOICE ]);
    }
public function validate ( $ value ) { return in_array ( $ value , $ this -> choices ) ? Ok :: unit ( ) : Error :: unit ( [ Error :: INVALID_CHOICE ] ) ; }
Tells if a given value is a valid choice according to the property's definition.

@param mixed $value

@return ResultInterface Returns Ok if the value is valid, otherwise an Error is returned.
Tells if a given value is a valid choice according to the property s definition .