1. #1
    Ext User dante's Avatar
    Join Date
    Aug 2007
    Posts
    69
    Vote Rating
    0
    dante is on a distinguished road

      0  

    Post Checkbox: what does isValid() check?

    Checkbox: what does isValid() check?


    As per the documentation, Checkboxes can be validated by ext. However, what is checked during a validation of a checkbox? There is neither a allowBlank nor a vtype attribute. So how can I define under which condition a Checkbox is valid?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Looking at the source, there's no base implementation of validation for a checkbox. The markInvalid/clearInvalid functions do nothing and are basically disabled.

  3. #3
    Ext User dante's Avatar
    Join Date
    Aug 2007
    Posts
    69
    Vote Rating
    0
    dante is on a distinguished road

      0  

    Arrow


    Okay, but then it would make sense to enable vtype functionality for checkboxes in order to provide a possibility for custom validation.

    Should I post that in the bug forum?

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    vtype is not really intended to do cross field validation. I would think you would want to be looking at using the form binding functionality to validate whether the checkbox is ok based on other inputs, or use the validation and/or event handling of the other fields to indicate the checkbox status.

  5. #5
    Ext User
    Join Date
    Dec 2007
    Posts
    4
    Vote Rating
    0
    longahc is on a distinguished road

      0  

    Default


    Tim,

    Don't you feel that adding an allowBlank attribute would be a valid for the Checkbox control? I have a checkbox on my registration page that must be checked for the form to be valid (i.e. "I am at least 13 years of age."). If that checkbox isn't checked I don't want the form to pass validation. I understand I can workaround this using the validation event but this is a common use case for the use of a checkbox. Thought I'd chime in on the suggested update.

    Thanks!

  6. #6
    Ext User
    Join Date
    Dec 2007
    Posts
    67
    Vote Rating
    0
    jit is on a distinguished road

      0  

    Default


    I'd also like to see checkboxes with the capability to support validation for the case where you want the user to always check the box, e.g. 'I agree to these terms and conditions'. It would be great if the markInvalid method could be added to them in a similar fashion to the other fields.

    Thanks

    Jit

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar