improve capitalize validation