readonly works properly just in the first validation
See original GitHub issueGiven the next code:
from cerberus import Validator
v = Validator({
'id': {'type': 'integer', 'readonly': True},
})
v.validate({'id': 1}) # False
v.validate({'id': 1}) # True
v.validate({'id': 1}) # True
v.validate({'id': 1}) # True
Just the first call validates correctly and return False
. The subsequent calls to validate(...)
return True. This just happen to me with property readonly
. It looks like the validation works just on time.
Is this an intentional behavior of this library?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Validation error with readonly input attribute and [Required ...
I'm just making it readonly on the Reset Password UI so user does not mistype it etc. Oh, better then, change the form...
Read more >Validation Rule Problem - making record read only
your validation rule is preventing Record to be saved with those values, but you need to prevent it from moving away from them....
Read more >Read only Field through validation rule - Salesforce Developers
Hi,. How can i make a field as read only using either validation rule / trigger code? If the value in the field...
Read more >useForm - register - React Hook Form
Validation rules are all based on the HTML standard and also allow for ... dot syntax only for typescript usage consistency, so bracket...
Read more >Forms in HTML documents - W3C
Disabled and read-only controls. Disabled controls; Read-only controls. Form submission. Form submission method; Successful controls; Processing form data.
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 FreeTop 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
Top GitHub Comments
@nicolaiarocci can you please add a bug label and assign this issue to the 1.2 milestone? i’m in fear it may be forgotten otherwise as there has been no feedback so far.
It seems to be enough to reset
is_normalized
when a new document is coming in - all tests are passing now. The fact that this actually was not done before makes me wonder if there exist more bugs because of this. I will investigate further.@funkyfuture What do you think about this?