We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40249
    • 31 Posts
    How i can do Validation on min and maxlenght on a MIGX field in modx Backend?

    i've set minlenght and maxlenght for the TV.
    in the migx form i only get a warning in english when i'm under the minlenght even if my system is set to german.
    but also there is no maxlenght for the inputfield only a warning in english.
    when i hit the save button there is no validation for min or max lenght.

    Is there a way to translate or modify the Warning Message?
    How to Validate Formfields?

    thx
      • 4172
      • 5,888 Posts
      To limit the length, you can use
      http://modx.com/extras/package/charcountertv

      put into inputTVtype charcounter_textarea or charcounter_textbox
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 4172
        • 5,888 Posts
        But seems there is an issue with charcounter-TV when opening the MIGX-window with this TV in it more than once.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 40249
          • 31 Posts
          Hallo Bruno17,

          first i like to thank you for the great work with migx.

          i've tested you solution with an easy form only one textbox and a rich text and it works without any problems, i also tested with the text_area. works good so far, haven't tested with both combined or multiple textareas and textboxes.

          didn't tested with MIGXdb. i only used the TV like in the image example.
            • 4172
            • 5,888 Posts
            great!
            I have the issue, when opening the window a second time, the timer (which is counting the chars) doesn't find the correct input any more.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 40249
              • 31 Posts
              work perfect over here also when opening window several times.