// #region Imports
// #endregion
/**
 * Validator that requires the control's value to be equal to another control's value.
 *
 * State:
 * * badInput
 *
 * @public
 * @param element - The element to validate.
 * @param other - The other element to compare the value to.
 * @returns null if the validation check passes, otherwise an object containing information.
 */
export function equalsToValidator(element, other) {
    return isEqualsToValue(element.value, other.value)
        ? null
        : {
            badInput: [
                true, { actualValue: element.value }
            ]
        };
}
/**
 * Checks if the value is equal to another value.
 *
 * @param value - The value to check.
 * @param other - The other value to compare against.
 * @returns True if the value is equal to the other value, false otherwise.
 */
export function isEqualsToValue(value, other) {
    return value === null || other === null || value === other;
}
//# sourceMappingURL=EqualsToElementValidatorFn.js.map