Closed adwydman closed 6 years ago
@kuba-orlik
It makes no sense to instantiate an and
access strategy without any params. We should just throw an error in the parse_params
method when params
are not an array. What do you say?
I agree, but params
can be an object or an array as well. This should be verified.
Yes, in general, params
can be of any type. But in case of the and
and or
access strategies, params
must be arrays, peroid. I guess it would be cool to have a validate_params
method that would be a part of the field-type declaration and would validate any given params
before passing them to other methods. What do you think?
Issues moved do Sealcode's phabricator: https://hub.sealcode.org/project/view/11/
Consider this piece of code:
If
params
provided initem_sensitive
method is, let's say,undefined
,parse_params
will throw an error while trying to loop through it and this is unsafe. And since we want all chips to export themselves, there should be some kind of validation above them.