src/Bond/Database/Enum.php
public function isValid( $name, $value = null )
    {
        if( !isset( $this->enums[$name] ) ) {
            return false;
        } elseif( $value === null ) {
            return true;
        }
        return !isset( $value ) || in_array( $value, $this->enums[$name] );
    }
public function isValid( $name, $value = null )
    {
        if( !isset( $this->enums[$name] ) ) {
            return false;
        } elseif( $value === null ) {
            return true;
        }
        return !isset( $value ) || in_array( $value, $this->enums[$name] );
    }
public function isValid ( $ name , $ value = null ) { if ( ! isset ( $ this -> enums [ $ name ] ) ) { return false ; } elseif ( $ value === null ) { return true ; } return ! isset ( $ value ) || in_array ( $ value , $ this -> enums [ $ name ] ) ; }
Is valid check
@param string enum name
@param string value
@return bool
Is valid check