Uploaded image for project: 'JBoss Developer Materials'
  1. JBoss Developer Materials
  2. JDF-659

Kitchensink Backbone: Client side form validation does not work in IE9

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • quickstarts
    • None

    Description

      Kitchensink Backbone quickstart is using HTML5 form validation, which is not supported in IE9. Because of that, adding a new member fails in IE9.

      A possible workaround is to to perform validation on lines 167-180 of app.js only if HTML5 validation is supported, for example like this:

      if(typeof(elemName.get(0).checkValidity) === 'function') {
          // Verify if the name field is valid for the HTML5 constraints specified on it.
          if(!elemName.get(0).checkValidity()) {
              errors.push({$elem : elemName});
          }
       
          // Verify if the email field is valid for the HTML5 constraints specified on it.
          if(!elemEmail.get(0).checkValidity()) {
              errors.push({$elem : elemEmail});
          }
       
          // Verify if the phone number field is valid for the HTML5 constraints specified on it.
          if(!elemPhoneNumber.get(0).checkValidity()) {
              errors.push({$elem : elemPhoneNumber});
          }
      }
      

      Server-side validation is then used in IE9.

      Attachments

        Activity

          People

            vineet.reynolds_jira Vineet Reynolds (Inactive)
            okiss_jira Oliver Kišš (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: