add forgiving API key validation with inline errors
Add KeyValidation module for format-checking API keys before attempting connections. Auto-strips whitespace, detects common mistakes (e.g. pasting a Stripe publishable key), and returns helpful error messages. Inline field errors across all three entry points: - Setup wizard: provider + Stripe keys - Admin provider form: simplified to single Connect button - Email settings: per-field errors instead of flash toasts Also: plain text inputs for all API keys (not password fields), accessible error states (aria-invalid, role=alert, thick border, bold text), inner_block slot declaration on error component. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -553,6 +553,7 @@
|
||||
|
||||
.admin-input-error {
|
||||
border-color: var(--t-status-error);
|
||||
border-width: 2px;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--t-status-error);
|
||||
@@ -876,13 +877,20 @@
|
||||
.admin-error {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.375rem;
|
||||
margin-top: 0.375rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--t-status-error);
|
||||
}
|
||||
|
||||
.admin-error-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Link ── */
|
||||
|
||||
.admin-link {
|
||||
@@ -4774,7 +4782,7 @@
|
||||
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.ml-1 { margin-inline-start: 0.25rem; }
|
||||
|
||||
.external-link-icon {
|
||||
.external-link-icon.external-link-icon {
|
||||
width: 0.75em;
|
||||
height: 0.75em;
|
||||
margin-inline-start: 0.25em;
|
||||
|
||||
Reference in New Issue
Block a user