Validate and Format Helper Functions.