public static function validate(Column $coldef, $value)
    {
        $field = $coldef->getName();
        try
        {
            $valid = $coldef->validate($value);
        }
        catch (InvalidValueException $e)
        {
            $rep = WF::str($value);
            throw new InvalidValueException("Field $field cannot be set to $rep: {$e->getMessage()}");
        }
        
        return $valid;
    }
public static function validate(Column $coldef, $value)
    {
        $field = $coldef->getName();
        try
        {
            $valid = $coldef->validate($value);
        }
        catch (InvalidValueException $e)
        {
            $rep = WF::str($value);
            throw new InvalidValueException("Field $field cannot be set to $rep: {$e->getMessage()}");
        }
        
        return $valid;
    }
public static function validate ( Column $ coldef , $ value ) { $ field = $ coldef -> getName ( ) ; try { $ valid = $ coldef -> validate ( $ value ) ; } catch ( InvalidValueException $ e ) { $ rep = WF :: str ( $ value ) ; throw new InvalidValueException ( "Field $field cannot be set to $rep: {$e->getMessage()}" ) ; } return $ valid ; }
Validate a value for the field before setting it. This method is called
from the setField method before updating the value. You can override
this to add validators. Be sure to call the super validator to validate
the base field to match the column definition.

@param Column $coldef The column
@param mixed $value The value to validate
@return bool True if the value is valid
@throws InvalidValueException When the value is not acceptable
Validate a value for the field before setting it . This method is called from the setField method before updating the value . You can override this to add validators . Be sure to call the super validator to validate the base field to match the column definition .