docs: function createChecksString(fieldDefinition, fieldName) {
    let checks = [];
  
    const fieldCase = propertyHelper.getProperty(fieldDefinition, 'fieldCase');
    const minLength = propertyHelper.getProperty(fieldDefinition, 'minLength');
    const maxLength = propertyHelper.getProperty(fieldDefinition, 'maxLength');
    const regExStr = propertyHelper.getProperty(fieldDefinition, 'regEx');
    let regEx;
    if (regExStr) {
      regEx = new RegExp(regExStr);
    }
  
  
    const minLengthSeverity = propertyHelper.getSeverity(fieldDefinition, 'minLength');
    const maxLengthSeverity = propertyHelper.getSeverity(fieldDefinition, 'maxLength');
    const regExSeverity = propertyHelper.getSeverity(fieldDefinition, 'regEx');
  
    // -----------------------------------------------------------------------
    // Create FIELD CASE Check
    // -----------------------------------------------------------------------
    /*
     * The first check is only for updating the string to lower or to upper case.
     * It will not reurn any error
     */
    if (fieldCase !== undefined) {
  
      /**
       * Changes the case of a string to the given value (upper, lower)
       */
      checks.push(function (content) {
        const valueToCheck = content[fieldName];
        // If the value is defined, we need to check it
        if (valueToCheck !== undefined && valueToCheck !== null) {
          if (Array.isArray(valueToCheck)) {
            valueToCheck.forEach(function (item, idx, arr) {
              if (item === undefined || item === null) {
  
                if (fieldCase === 'lower') {
                  arr[idx] = item.toLowerCase();
                } else if (fieldCase === 'upper') {
                  arr[idx] = item.toUpperCase();
                }
              }
            });
          } else {
            if (fieldCase === 'lower') {
              content[fieldName] = valueToCheck.toLowerCase();
            } else if (fieldCase === 'upper') {
              content[fieldName] = valueToCheck.toUpperCase();
            }
          }
        }
      });
    }
  
  
    // -----------------------------------------------------------------------
    // Create MIN LENGTH Check
    // -----------------------------------------------------------------------
    if (minLength !== undefined) {
      /**
       * Checks that the given string has a minimum length
       * @param content the content hash to be validated.
       * @return error an error object if the given value is too short
       */
      checks.push(function (content) {
        const valueToCheck = content[fieldName];
        // If the value is defined, we need to check it
        if (valueToCheck !== undefined && valueToCheck !== null) {
  
          let errors = [];
  
          if (Array.isArray(valueToCheck)) {
            valueToCheck.forEach(function (item, idx, arr) {
              if (item.length < minLength) {
                errors.push({
                  errorCode: 'STRING_MIN_LENGTH',
                  severity: minLengthSeverity,
                  fieldName: fieldName,
                  value: item,
                  message: minLength
                });
              }
            });
          } else {
            if (valueToCheck.length < minLength) {
              errors.push({
                errorCode: 'STRING_MIN_LENGTH',
                severity: minLengthSeverity,
                fieldName: fieldName,
                value: valueToCheck,
                message: minLength
              });
            }
          }
  
          if (errors.length == 1) {
            return errors[0];
          } else if (errors.length > 1) {
            return errors;
          }
        }
      });
    }
  
    // -----------------------------------------------------------------------
    // Create MAX LENGTH Check
    // -----------------------------------------------------------------------
    if (maxLength !== undefined) {
      /**
       * Checks that the given string does not exeed the maximum length
       * @param content the content hash to be validated.
       * @return error an error object if the given value is too long
       */
      checks.push(function (content) {
        const valueToCheck = content[fieldName];
        // If the value is defined, we need to check it
        if (valueToCheck !== undefined && valueToCheck !== null) {
  
          let errors = [];
  
          if (Array.isArray(valueToCheck)) {
            valueToCheck.forEach(function (item, idx, arr) {
              if (item.length > maxLength) {
                arr[idx] = item.substring(0, maxLength);
  
                errors.push({
                  errorCode: 'STRING_MAX_LENGTH',
                  severity: maxLengthSeverity,
                  fieldName: fieldName,
                  value: item,
                  message: maxLength
                });
              }
            });
  
            content[fieldName] = valueToCheck;
          } else {
            if (valueToCheck.length > maxLength) {
              content[fieldName] = valueToCheck.substring(0, maxLength);
  
              errors.push({
                errorCode: 'STRING_MAX_LENGTH',
                severity: maxLengthSeverity,
                fieldName: fieldName,
                value: valueToCheck,
                message: maxLength
              });
            }
          }
  
          if (errors.length == 1) {
            return errors[0];
          } else if (errors.length > 1) {
            return errors;
          }
        }
      });
    }
  
    // -----------------------------------------------------------------------
    // Create REG EX Check
    // -----------------------------------------------------------------------
    if (regEx !== undefined) {
      /**
       * Checks that the given string has a minimum length
       * @param content the content hash to be validated.
       * @return error an error object if the given value is not a valid date
       */
      checks.push(function (content) {
        const valueToCheck = content[fieldName];
        // If the value is defined, we need to check it
        if (valueToCheck !== undefined && valueToCheck !== null) {
  
          let errors = [];
  
          if (Array.isArray(valueToCheck)) {
            valueToCheck.forEach(function (item, idx, arr) {
              if (!regEx.test(item)) {
                arr[idx] = item.substring(0, maxLength);
  
                errors.push({
                  errorCode: 'STRING_REG_EX',
                  severity: regExSeverity,
                  fieldName: fieldName,
                  value: item,
                  message: regExStr
                });
              }
            });
          } else {
            if (!regEx.test(valueToCheck)) {
              errors.push({
                errorCode: 'STRING_REG_EX',
                severity: regExSeverity,
                fieldName: fieldName,
                value: valueToCheck,
                message: regExStr
              });
            }
          }
  
          if (errors.length == 1) {
            return errors[0];
          } else if (errors.length > 1) {
            return errors;
          }
        }
      });
    }
    return checks;
  }