public static function presence($cls, $id, $attr, $attr_value, $validation_value, $options)
    {
        if (!$validation_value) {
            return true;
        }
        return strlen(trim($attr_value)) > 0;
    }
public static function presence($cls, $id, $attr, $attr_value, $validation_value, $options)
    {
        if (!$validation_value) {
            return true;
        }
        return strlen(trim($attr_value)) > 0;
    }
public static function presence ( $ cls , $ id , $ attr , $ attr_value , $ validation_value , $ options ) { if ( ! $ validation_value ) { return true ; } return strlen ( trim ( $ attr_value ) ) > 0 ; }
Check if an attribute is present

@param string $cls              class
@param mixed  $id               id
@param string $attr             attribute
@param mixed  $attr_value       attribute value
@param mixed  $validation_value validation value
@param mixed  $options          options

@return valid or not
Check if an attribute is present