FactorConfig

Configuration options for validators that perform comparison-based validation.

The FactorConfig interface extends the BaseValidatorConfig interface to provide configuration options for validators that perform comparison-based validation using a factor and potentially a field name. This can be useful for scenarios where you want to validate a field's value against another value or against a calculated value.

Inheritence

Properties:

  • dividend (Optional): A number representing the factor used in the comparison. The specific validation logic might depend on the library implementation, but common use cases include:
    • Dividing the value of another field by dividend and comparing the result to the current field's value.
    • Multiplying the current field's value by dividend and comparing it to a specific value.
  • fieldName (Optional): A string representing the name of another field in the form. This field name can be used in conjunction with dividend for comparison-based validation logic.