LearnNewsExamplesServices
Frontmatter
id4161
titleform.field.Checkbox: Required validation needed
stateClosed
labels
enhancement
assignees[]
createdAtMar 2, 2023, 11:43 AM
updatedAtApr 24, 2023, 6:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/4161
authoralberthashani
commentsCount6
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 24, 2023, 6:58 PM

form.field.Checkbox: Required validation needed

Closed v8.1.0 enhancement
alberthashani
alberthashani commented on Mar 2, 2023, 11:43 AM

(No description provided)

alberthashani added the enhancement label on Mar 2, 2023, 11:43 AM
tobiu
tobiu Mar 2, 2023, 12:40 PM

some thoughts: we could pretty easily add a required_ config, as well as a validate() & isValid() method. these methods could add a neo-invalid css rule and we could e.g. add a red color.

adding an error message (label) would be a follow up ticket which requires more work => we would need to adjust the vdom structure to support it.

alberthashani
alberthashani Mar 2, 2023, 3:43 PM

Nice, I think we would need the custom error message right away, so shall i include/define that in the description of this feature request or is it nessecary from your point of view to have them in sperate feature requests?

tobiu
tobiu Mar 2, 2023, 3:45 PM

i would go for 2 tickets to keep the scope of each smaller :) a checkbox with a red background would be pretty obvious to be required i guess, but you never know.

alberthashani
alberthashani Mar 2, 2023, 4:50 PM

Ok I’m with you, i will create another ticket for custom error messages as soon as this is closed.

tobiu referenced in commit 0b48de5 - "#4161 form.field.Checkbox: adjusted the DOM markup to support error messages" on Apr 24, 2023, 1:32 PM
tobiu referenced in commit c2f36a7 - "#4161 form.field.Checkbox: error div styling" on Apr 24, 2023, 1:36 PM
tobiu referenced in commit f788fa6 - "#4161 examples.form.field.checkbox.MainContainer: error TextField" on Apr 24, 2023, 2:36 PM
tobiu referenced in commit a755d94 - "#4161 form.field.CheckBox: required_" on Apr 24, 2023, 2:42 PM
tobiu referenced in commit 6ac955a - "#4161 form.field.CheckBox: error_" on Apr 24, 2023, 2:43 PM
tobiu referenced in commit 93e309e - "#4161 form.field.CheckBox: afterSetError()" on Apr 24, 2023, 2:46 PM
tobiu
tobiu Apr 24, 2023, 2:47 PM

work in progress:

Screenshot 2023-04-24 at 14 46 29

@alberthashani @deniztoprak

tobiu referenced in commit 8b6d0a2 - "#4161 form.field.CheckBox: afterSetError() => neo-invalid css rule" on Apr 24, 2023, 4:14 PM
tobiu referenced in commit 2a76c7f - "#4161 form.field.CheckBox: .neo-invalid styling" on Apr 24, 2023, 4:24 PM
tobiu referenced in commit 741ee8a - "#4161 form.field.CheckBox: isValid()" on Apr 24, 2023, 4:27 PM
tobiu referenced in commit 12028dd - "#4161 form.field.CheckBox: validate()" on Apr 24, 2023, 4:34 PM
tobiu referenced in commit 22b4384 - "#4161 form.field.CheckBox: validate() => resetting the error config if needed" on Apr 24, 2023, 4:36 PM
tobiu referenced in commit 60ef60a - "#4161 form.field.CheckBox: afterSetChecked() => triggering validate()" on Apr 24, 2023, 4:38 PM
tobiu referenced in commit 971cd98 - "#4161 form.field.CheckBox: afterSetRequired()" on Apr 24, 2023, 4:43 PM
tobiu referenced in commit 3c807b7 - "#4161 form.field.CheckBox: clean class field" on Apr 24, 2023, 4:44 PM
tobiu referenced in commit a44b7bb - "#4161 form.field.CheckBox: updateError()" on Apr 24, 2023, 6:25 PM
tobiu referenced in commit aaf756b - "#4161 form.field.CheckBox: removed the auto-generated import" on Apr 24, 2023, 6:30 PM
tobiu referenced in commit ca89207 - "#4161 form.field.CheckBox: afterSetRequired() => smarter check" on Apr 24, 2023, 6:32 PM
tobiu referenced in commit 9bac8e2 - "#4161 form.field.CheckBox: validate() => smarter logic" on Apr 24, 2023, 6:35 PM
tobiu referenced in commit 98f1da4 - "#4161 form.field.CheckBox: validate() => else logic, superclass call" on Apr 24, 2023, 6:37 PM
tobiu referenced in commit 49675e5 - "#4161 form.field.CheckBox: validate() => getting the logic closer to TextFields" on Apr 24, 2023, 6:43 PM
tobiu referenced in commit 027defc - "#4161 form.field.CheckBox: validate() => removing the clean state if needed" on Apr 24, 2023, 6:53 PM
tobiu referenced in commit ba4f3fe - "#4161 form.field.CheckBox: cleanup" on Apr 24, 2023, 6:56 PM
tobiu
tobiu Apr 24, 2023, 6:58 PM

done now. let us create a new ticket for groupRequired or similar (check 1+ items out of many)

tobiu closed this issue on Apr 24, 2023, 6:58 PM