adding trimRight before calling
any validation