File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,9 +414,7 @@ def values(self, new_value):
414414 self ._values = [dtypes .get (v , self .dtype ) for v in new_value ]
415415
416416 # Validate and inform user if the current values cardinality is violated
417- valid = validation .Validation (self )
418- for err in valid .errors :
419- print ("%s: %s" % (err .rank .capitalize (), err .msg ))
417+ self ._values_cardinality_validation ()
420418
421419 @property
422420 def value_origin (self ):
@@ -553,6 +551,13 @@ def val_cardinality(self, new_value):
553551 self ._val_cardinality = format_cardinality (new_value )
554552
555553 # Validate and inform user if the current values cardinality is violated
554+ self ._values_cardinality_validation ()
555+
556+ def _values_cardinality_validation (self ):
557+ """
558+ Runs a validation to check whether the values cardinality
559+ is respected and prints a warning message otherwise.
560+ """
556561 valid = validation .Validation (self )
557562 for err in valid .errors :
558563 print ("%s: %s" % (err .rank .capitalize (), err .msg ))
You can’t perform that action at this time.
0 commit comments