<commit_before>$(document).ready(function() {
  var base_validation_form = $( "form.elective-block" );
  var base_validation_handler = base_validation_form.validate();

  $("input.save-subject").click(function() {
    $("input.lazy-validate").each(function() {
      $(this).rules("add", {
        required:true
      });
    });

    if(base_validation_handler.form()) {<commit_msg>Fix: cannot add new elective block from within subject form part<commit_after>$(document).ready(function() {
  var base_validation_form = $( "form.elective-block" );
  var base_validation_handler = base_validation_form.validate();

  $("input.save-subject").click(function() {
    $("input.lazy-validate", "div.elective-subjects").each(function() {
      $(this).rules("add", {
        required:true
      });
    });
    $("input.lazy-validate, select.lazy-validate", "div.elective-blocks").each(function() {
      $(this).rules("remove");
    });

    if(base_validation_handler.form()) {
{'fraction_non_alphanumeric': 0.18499486125385406, 'fraction_numerical': 0.0, 'mean_word_length': 4.126315789473685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5391067', 'n_tokens_mistral': 303, 'n_tokens_neox': 297, 'n_words': 40}