/** * Validate the emptiness of a number */ protected function _validateNumber($value, $column) { // Not much to check, since 0 is falsy but also a valid integer value. if (is_null($value)) { throw new Garp_Model_Validator_Exception(sprintf(__('%s is a required field'), __(Garp_Util_String::underscoredToReadable($column)))); } }
public function testUnderscoredToReadable() { $this->assertEquals('This is underscored', Garp_Util_String::underscoredToReadable('this_is_underscored')); $this->assertEquals('this is underscored', Garp_Util_String::underscoredToReadable('this_is_underscored', false)); }