4 ms·
As always (not go specific), forms example is missing form validation. Is that too old-fashioned?
by elmacho39 10y ago
As always (not go specific), forms example is missing form validation. Is that too old-fashioned?
- fallenhitokiri 10y agoWhat kind of validation are you looking for? Simple things like "is not empty", "maximum 8 characters"...? Most libraries I've seen which try to do form validation always lack in certain areas or force you to define your own validation, so I simply ended up adding an `isValid` method to my structs.
- elmacho39 10y agoI want to see a full roundtrip: 1. define input fields in html template of choice 2. validate form/struct/whatever and prepare errror messages per field 3. redisplay html with field-level errors to let user correct its input step 3. is the interesting and missing in most examples of newer webframeworks