<commit_before>$ ->
    window.product_form_options =
        rules:
            'product[name]': 'required'
            'product[description]':
                required: true
                maxlength: 500
            'product[price]':
                required: true
                decimalTwo: true
            'product[quantity]':
                digits: true
                required: (element) ->
                    !($ '#product_unlimited_quantity').prop('checked')
            'product[flatrate_shipping_cost]':
                decimalTwo: true
                required: (element) -> element.value isnt ''

    $.extend(product_form_options, form_options)
<commit_msg>adding ranges to product_form_validation_rules - validation now accepts 0 - 999999<commit_after>$ ->
    window.product_form_options =
        rules:
            'product[name]': 'required'
            'product[description]':
                required: true
                maxlength: 500
            'product[price]':
                required: true
                decimalTwo: true
                range: [0, 999999]
            'product[quantity]':
                digits: true
                range: [0, 999999]
                required: (element) ->
                    !($ '#product_unlimited_quantity').prop('checked')
            'product[flatrate_shipping_cost]':
                decimalTwo: true
                range: [0, 999999]
                required: (element) -> element.value isnt ''

    $.extend(product_form_options, form_options)

{'fraction_non_alphanumeric': 0.10353866317169069, 'fraction_numerical': 0.022280471821756225, 'mean_word_length': 1.5198019801980198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2497574', 'n_tokens_mistral': 424, 'n_tokens_neox': 375, 'n_words': 77}