validation trimming