Skip to content

Conversation

andreafeletto
Copy link
Contributor

Closes #91

@andreafeletto
Copy link
Contributor Author

Given this note from the HTML spec:

Implementers are strongly urged to carefully examine any third-party libraries they might consider using to implement the parsing of syntaxes described below. For example, date libraries are likely to implement error handling behavior that differs from what is required in this specification, since error-handling behavior is often not defined in specifications that describe date syntaxes similar to those used in this specification, and thus implementations tend to vary greatly in how they handle errors.

I think I'll implement a datetime library inside src/html with strict adherence to the HTML spec. I think it will be a good idea to implement parsing functions and wrap those in validation functions. This way each parser can reuse other parsers (for example Month is always the prefix of Date) and the element validation code can use the .custom rule without polluting Attribute.zig.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<input> [autocomplete] [min] [max] [step]: implement validation

1 participant