Hierarchy

  • UpNumberEditControl
    • Currency

Accessors

  • get maxLength(): number
  • Gets the maximum length of the control.

    Returns number

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    console.log(ctrl.maxLength);
  • set maxLength(value): void
  • The maxLength property is used to set the maximum number of characters that can be entered into the control.

    • If the value exceeds the specified length, the control will be marked as invalid.

    Parameters

    • value: number

    Returns void

    Note

    The maxLength property is used for client-side validation only. To enforce a maximum length on the server side, you must set up the corresponding validation rule within the controls configuration.

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    // Allow only 120 characters
    ctrl.maxLength = 120;
  • get required(): boolean
  • Can get required status.

    Returns boolean

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    console.log(ctrl.required);
  • set required(value): void
  • Sets required status.

    Parameters

    • value: boolean

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.required = true;

Methods

  • Checks if the value matches the regex and is in range of values.

    Returns Promise<ValidationInfo>

    Example

    var ctrl = await ix.api.dom.getControl("<ELEMENT-GUID>").checkValidity();
    
  • Gets the fields maximum value.

    Returns undefined | string

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    var maxVal = ctrl.getMaxValue();
  • Gets the fields minimum value.

    Returns undefined | string

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    var minVal = ctrl.getMinValue();
  • Get the current value of the control as JavaScript number object.

    Returns number

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    console.log(ctrl.getNumberObject());

    // Example:
    // Formatted field value (float/currency): "1.000,00"
    // Returns: 1000 (number object)

    // Example:
    // Formatted field value (integer): "1.000"
    // Returns: 1000 (number object)
  • Returns the fields value.

    Returns string

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    var val = ctrl.getValue();
  • Checks if the value is in range of values the user gives.

    Parameters

    • Optional input: string

      The value to check

    Returns boolean

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    console.log(ctrl.isInRange());
  • Checks if the value is valid

    Parameters

    • Optional value: string | number

      value to check

    Returns boolean

    boolean if value is valid

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.isValid();
  • Sets the fields maximum value.

    Parameters

    • value: string | number
    • options: {
          checkValidity: boolean;
      } = ...

      An object of possible options to pass

      • checkValidity: boolean

        Whether to run and report the validation (default: true)

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    // Set max value to 100
    ctrl.setMaxValue(100);
  • Sets the fields minimum value.

    Parameters

    • value: string | number
    • options: {
          checkValidity: boolean;
      } = ...

      An object of possible options to pass

      • checkValidity: boolean

        Whether to run and report the validation (default: true)

    Returns void

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    // Set min value to 50
    ctrl.setMinValue(50);
  • Creates a local formatted string from a number object or string and writes it as value into a HTML control.

    Parameters

    • Optional input: string | number

      The local formatted string

    • Optional settings: {
          triggerOnchange?: "disabled" | "strict" | "always";
      }
      • Optional triggerOnchange?: "disabled" | "strict" | "always"

    Returns void

    Important

    The conversion uses the fields localization. A string must have the matching format for a propper result!

    Example

    var ctrl = ix.api.dom.getControl("<GUID>");
    ctrl.setValue("10000");
  • Converts a number or string to a local formatted string.

    Parameters

    • input: string | number

      The given input string/number to convert to the local format

    Returns string

    string with local formatted number or NaN

    Example

    var ctrl = ix.api.dom.getControl("<ELEMENT-GUID>");
    ctrl.toLocalFormat("10000");