First class field validator
See original GitHub issueDocumenting in person discussion.
It might make sense to have a "type": "field"
schema or something along this lines to collect options that apply to the field and not the type of the field, like a "not required"
optional that would leave the field unpopulated if it is not included.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Creating your first validator — FluentValidation documentation
To define a set of validation rules for a particular object, you will need to create a class that inherits from AbstractValidator<T> ,...
Read more >java - How to validate field level constraint before class level ...
Now, if the @Default group gets validated, first the class level constraints and then the field level ones will be validated.
Read more >RequiredFieldValidator Class (System.Web.UI.WebControls)
Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page...
Read more >Validation - Laravel - The PHP Framework For Web Artisans
To learn about Laravel's powerful validation features, let's look at a complete example of validating a form and displaying the error messages back...
Read more >Chapter 2. Validation step by step - Red Hat on GitHub
Constraints can be expressed by annotating a field of a class. ... In Section 5.1, “Configuration and ValidatorFactory” we will first show how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would also lean towards one single syntax: I imagine these schemas are (mostly) going to be programmatically generated, so having shorthand is only really helpful for writing tests for this package.
From https://github.com/samuelcolvin/pydantic-core/pull/92#pullrequestreview-1012497346
We want an intermediate dict above schema on a field. This does not affect the rust validators or validation, just the python interface for building schema.
Example:
We might add other stuff beyond
required
,schema
,alias
.