Skip to content

Commit baba160

Browse files
authored
Update docs to make first example work as expected
Fixes chainlist#95 It's expected that a form would behave as if it has checkOnInit on: empty form is invalid - false, once you add some input, it's true. One can of course read the documentation in detail to figure out what's wrong, but it might be useful for the first example to be self-sufficient. The change was proposed by grischaerbe in the issue, and it is already explained in documentation. Thoughts on adding this to documentation?
1 parent 50cacb9 commit baba160

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/docs/2_Examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ filename: 2_Examples.md
1111
import { form, field } from 'svelte-forms';
1212
import { required } from 'svelte-forms/validators';
1313
14-
const name = field('name', '', [required()]);
14+
const name = field('name', '', [required()], { checkOnInit: true });
1515
const myForm = form(name);
1616
</script>
1717

0 commit comments

Comments
 (0)