Phorm/Field.class.php
/**
	 * Validates that the value isn't null or an empty string.
	 * This is a built-in validation rule available to all fields
	 * (we have hard-coded logic in the is_valid() function
	 *  to call this if 'required' exists in the validation array).
	 *
	 * @param string $value
	 * @return null
	 * @throws Phorm_ValidationError
	 */
Validates that the value isn't null or an empty string.
This is a built-in validation rule available to all fields
(we have hard-coded logic in the is_valid() function
to call this if 'required' exists in the validation array).

@param string $value
@return null
@throws Phorm_ValidationError
Validates that the value isn ' t null or an empty string . This is a built - in validation rule available to all fields ( we have hard - coded logic in the is_valid () function to call this if ' required ' exists in the validation array ) . @param string $value @return null @throws Phorm_ValidationError
public function validate_required_field($value)
	{
		if ($value == '' || is_null($value))
		{
			throw new Phorm_ValidationError('validation_required');
		}
	}
public function validate_required_field ( $ value ) { if ( $ value == '' || is_null ( $ value ) ) { throw new Phorm_ValidationError ( 'validation_required' ) ; } }
Validates that the value isn't null or an empty string.
Validates that the value isn ' t null or an empty string .