styled raw input: disable required props, use validate instead

This commit is contained in:
Elijah Duffy
2025-09-05 14:20:12 -07:00
parent 52e9176d5a
commit 7a10f25aae

View File

@@ -8,7 +8,7 @@
import { generateIdentifier } from './util'; import { generateIdentifier } from './util';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
type $Props = Omit<HTMLInputAttributes, 'name' | 'value'> & { type $Props = Omit<HTMLInputAttributes, 'name' | 'value' | 'required' | 'aria-required'> & {
name?: string; name?: string;
value?: string; value?: string;
validate?: ValidatorOptions; validate?: ValidatorOptions;
@@ -62,6 +62,7 @@
{name} {name}
{placeholder} {placeholder}
aria-label={placeholder} aria-label={placeholder}
aria-required={validateOpts?.required}
{...others} {...others}
bind:value bind:value
class={[ class={[