Fix for validation on php version < 5.3