trim validation