Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays #63

Open
dgp1130 opened this issue Dec 24, 2016 · 0 comments
Open

Arrays #63

dgp1130 opened this issue Dec 24, 2016 · 0 comments

Comments

@dgp1130
Copy link
Member

dgp1130 commented Dec 24, 2016

Need some way of representing multiple inputs and subforms which are repeated. This would handle the use case of asking the user for a list of cars, previous employments, children, etc.

My proposal would be to look something like:

<!-- Mark each input with the same name -->
<input type="text" name="foo" />
<input type="text" name="foo" />
...
<input type="text" name="foo" />
string[]: foo; // Declare as a string

// Form is valid when all foo's are valid
valid: all foo.valid;

// Each foo is valid when it is filled
foo {
    valid: this matches @filled;
}

This example only really makes sense for primitive types. We might need to use some kind of custom types (mentioned in #50) to implement actual subforms as a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant