validation and thumbnail