Validators depending oneditprepare


With oneditprepare I switch the html form elements:

oneditprepare: function() {
  $("#node-input-ThresholdType").change(function() {
    if ($(this).val() === "fixed") {
    } else {

Depending on the shown elements I would like to validate / require different #node-inputfields. When setting the validator or required properties in defaults they are globally active.
How can I set these properties according to the change function?