protected override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     if (eventArgs.Status == ValidationStatus.Error)
     {
         ErrorText = eventArgs.Message;
     }
 }
Exemplo n.º 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) );
        }
Exemplo n.º 3
0
 protected override void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     if (eventArgs.Status == ValidationStatus.Error)
     {
         ErrorText = eventArgs.Messages?.Count() > 0
             ? string.Join(";", eventArgs.Messages)
             : null;
     }
 }
Exemplo n.º 4
0
        protected void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
        {
            if (previousValidationStatus != eventArgs.Status)
            {
                previousValidationStatus = eventArgs.Status;

                DirtyClasses();
                StateHasChanged();
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 private void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs e)
 {
     DirtyClasses();
     StateHasChanged();
 }
 protected virtual void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
 }
Exemplo n.º 8
0
 /// <inheritdoc/>
 protected virtual async void OnValidationStatusChanged(object sender, ValidationStatusChangedEventArgs eventArgs)
 {
     await InvokeAsync(StateHasChanged);
 }