protected override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     if (eventArgs.Status == ValidationStatus.Error)
     {
         ErrorText = eventArgs.Message;
     }
 }
示例#2
0
        /// <inheritdoc/>
        protected override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
        {
            base.OnValidationStatusChanged(sender, eventArgs);

            // Since radios validation works little different when placed in radio group we need
            // to notify them to re-render when validation changes.
            RadioCheckedChanged?.Invoke(this, new(CheckedValue) );
        }
 protected override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     if (eventArgs.Status == ValidationStatus.Error)
     {
         ErrorText = eventArgs.Messages?.Count() > 0
             ? string.Join(";", eventArgs.Messages)
             : null;
     }
 }
示例#4
0
        protected void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
        {
            if (previousValidationStatus != eventArgs.Status)
            {
                previousValidationStatus = eventArgs.Status;

                DirtyClasses();
                StateHasChanged();
            }
        }
示例#5
0
        /// <inheritdoc/>
        protected async override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
        {
            if (eventArgs.Status == ValidationStatus.Error)
            {
                ErrorMessages = eventArgs.Messages?.Where(x => !string.IsNullOrEmpty(x))?.Count() > 0
                    ? eventArgs.Messages?.Where(x => !string.IsNullOrEmpty(x))?.ToArray()
                    : null;
            }

            await InvokeAsync(StateHasChanged);
        }
示例#6
0
 private void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs e)
 {
     DirtyClasses();
     StateHasChanged();
 }
 protected virtual void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
 }
示例#8
0
 /// <inheritdoc/>
 protected virtual async void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     await InvokeAsync(StateHasChanged);
 }