Skip to content

[spike] API for an easy way to add custom validation on a form #60

@maddalax

Description

@maddalax

https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity

rough draft api could maybe look something like:

h.Validation(opts ... ValidationOpt)

validation.Regex() ValidationOpt
validation.Js()
validation.Required()
validation.Partial(partial PartialFunc)
h.Input(
   h.Validation(
     validation.Regex()
   ) 
)

using partials and doing the validation in go code might be a better option tho... spike this and find out

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestspikeIf this is something that is just an experiment or should be permanent

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions