示例#1
0
        internal void NotifyInputChanged(object newExpressionValue = null, bool overrideNewValue = false)
        {
            var newValidationValue = overrideNewValue
                ? newExpressionValue
                : inputComponent.ValidationValue;

            var valueChanged = newValidationValue is Array newArrayValue
                ? !Comparers.AreArraysEqual(lastValidationValue as Array, newArrayValue)
                : lastValidationValue != newValidationValue;

            if (valueChanged)
            {
                lastValidationValue = newValidationValue;

                if (EditContext != null && hasFieldIdentifier)
                {
                    EditContext.NotifyFieldChanged(fieldIdentifier);
                }

                if (Mode == ValidationMode.Auto)
                {
                    Validate(newValidationValue);
                }
            }
        }