#465: Refactoring id validator