Skip to content

Commit

Permalink
Update docs to make first example work as expected
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
Kelamir authored Feb 17, 2023
1 parent 50cacb9 commit baba160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docs/2_Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ filename: 2_Examples.md
import { form, field } from 'svelte-forms';
import { required } from 'svelte-forms/validators';
const name = field('name', '', [required()]);
const name = field('name', '', [required()], { checkOnInit: true });
const myForm = form(name);
</script>
Expand Down

0 comments on commit baba160

Please sign in to comment.