Ensure field ID's are always safe to be used as DOM ID's

This commit is contained in:
Andrew Kingston 2021-02-03 10:32:21 +00:00
parent 8d8cffc7fc
commit ba8d8b5327
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@
const makeFieldState = (field, defaultValue) => { const makeFieldState = (field, defaultValue) => {
return writable({ return writable({
field, field,
fieldId: `id-${generateID()}-${field}`, fieldId: `id-${generateID()}`,
value: initialValues[field] ?? defaultValue, value: initialValues[field] ?? defaultValue,
error: null, error: null,
valid: true, valid: true,