code: protected String trimIfNeeded(final String data) {
          String resultData = data;
  
          if (trimDataBeforeValidation && (data != null)) {
              resultData = data.trim();
          }
  
          return resultData;
      }
docs: Trims the data string if the {@link #trimDataBeforeValidation} is set.<br>This method is to be called by concrete
  sub-classes before validation.
  
  @param data Data to be maybe trimmed before validation.
  
  @return Trimmed data or untrimmed data.