Refactor validation functions for personalize elements.