Make validation optional
See original GitHub issueI was trying to optimize some code of mine using the library (billions of DFA operations) so I ran a profiler and saw a lot of time was spent doing unions, specifically in PartitionRefinement.refine, cross product graph creation and then what surprised me was the __init__
function. And half of the time was due to validation.
I think validation should be optional, so the user could pass in validate=False
as a keyword argument when the user is a 100% sure that the construction is valid.
Thoughts on this?
Issue Analytics
- State:
- Created a year ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Laravel validation rules - optional, but validated if present
I'm trying to make it validate ONLY if it's passed as not null, and nothing, not even 'sometimes' works :/ I'm trying to...
Read more >how to validate optional fields - Laracasts
Hello everyone, I've some optional fields in my form. I want to know how to validate the optional fields only when the user...
Read more >How to make a field optional using the validation rule in Laravel
In this shot, you will learn how to create optional and validated fields submitted from your form. This rule is one of the...
Read more >Form validation when the field is optional - UX Stack Exchange
I'd go with option 2 (validate the field if it has been filled out). Option 1 (no validation) – users may provide an...
Read more >Validate optional fields in Laravel - 5 Balloons
Validate optional fields in Laravel ... You can make use of nullable validation to only validate if user provided an value for the...
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
@Tagl @eliotwrobson Great, thank you for the feedback. I already have a separate branch live for the global configuration, and will submit a PR for that within the next few days.
I agree, keep immutability. This could be noted in documentation for performance as a recommendation. A flag for validation is necessary in my opinion, as validation is one of the most demanding computation and is mainly a quality of life check when constructing the automata.