parameters: (self, selection,
                         v_x, v_y, v_z,
                         n_x, n_y, n_z)
return_statement: return True
docstring: Check that the input is valid.
  
          Some values may not need to be checked because
          the interface may not allow to input wrong data.
docstring_summary: Check that the input is valid.
docstring_tokens: Check that the input is valid .
function: def validate_input(self, selection,
                         v_x, v_y, v_z,
                         n_x, n_y, n_z):
          """Check that the input is valid.
  
          Some values may not need to be checked because
          the interface may not allow to input wrong data.
          """
          if not selection:
              _err(translate("draft","At least one element must be selected."))
              return False
  
          if n_x < 1 or n_y < 1 or n_z < 1:
              _err(translate("draft","Number of elements must be at least 1."))
              return False
  
          # TODO: this should handle multiple objects.
          # Each of the elements of the selection should be tested.
          obj = selection[0]
          if obj.isDerivedFrom("App::FeaturePython"):
              _err(translate("draft","Selection is not suitable for array."))
              _err(translate("draft","Object:") + " {0} ({1})".format(obj.Label, obj.TypeId))
              return False
  
          # The other arguments are not tested but they should be present.
          if v_x and v_y and v_z:
              pass
  
          self.fuse = self.form.checkbox_fuse.isChecked()
          self.use_link = self.form.checkbox_link.isChecked()
          return True
function_tokens: def validate_input ( self , selection , v_x , v_y , v_z , n_x , n_y , n_z ) : if not selection : _err ( translate ( "draft" , "At least one element must be selected." ) ) return False if n_x < 1 or n_y < 1 or n_z < 1 : _err ( translate ( "draft" , "Number of elements must be at least 1." ) ) return False # TODO: this should handle multiple objects. # Each of the elements of the selection should be tested. obj = selection [ 0 ] if obj . isDerivedFrom ( "App::FeaturePython" ) : _err ( translate ( "draft" , "Selection is not suitable for array." ) ) _err ( translate ( "draft" , "Object:" ) + " {0} ({1})" . format ( obj . Label , obj . TypeId ) ) return False # The other arguments are not tested but they should be present. if v_x and v_y and v_z : pass self . fuse = self . form . checkbox_fuse . isChecked ( ) self . use_link = self . form . checkbox_link . isChecked ( ) return True