Bug Selection\Validation

12 posts, 1 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 01 May 2012 Link to this post

    Steps:
    1. Initialize the combo (assuming it's already populated in the markup as a select->option with text and values)
      $("#combo").kendoComboBox({
              filter: "contains"
          });
    2. Add a couple of characters to the end of the first item, thereby making it "technically" invalid as it's not an item in the combo
    3. Click your button to validate
    4. Passes
    5. Pick a new item from the combo
    6. Add a couple characters to the end
    7. Click button again
    8. Fails validation
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 03 May 2012 Link to this post

    Hello Steve,

     
    I am not sure that I was able to understand where the issue exactly is. Could you please provide a test project which replicates the problem?

    Greetings,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 03 May 2012 Link to this post

     Shouldn't need a project :)

    The problem is that once I change the text on the first combo item, it should invalidate that item...because it's not a valid selection anymore.  This is how it works when you select another item in the list, but on load the first item always passes validation.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 May 2012 Link to this post

    Hello Steve, 

    The ComboBox widget does not have any built-in validation functionality. Could you please provide a code snippet which shows the current implementation? Thus I will be able to observe it locallly and advice you further.
     

    Greetings,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 08 May 2012 Link to this post

    Right, but wire some up to it :) 

    Video: http://screencast.com/t/Vz2ilH3kNUDG
    Fiddle: http://www.screencast.com/t/YA0pfvmZp

    With "contains" the moment I change the text and there's no item in the combo that matches, it should fail validation.
  7. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 10 May 2012 Link to this post

    What do you think?...
  8. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 11 May 2012 Link to this post

    Hello Steve,

     
    Thank you for the screencasts. I believe that this behavior is expected and I cannot confirm it as a bug. The "required" attribute of the select element, means that the validation will pass if there is any value. As you probably know, the combobox widget allows custom value. Hence when you type "Item" the value of the combobox is "Item" and the validation passes. You can prevent custom value wiring the change event and clearing the combobox's value using value method. Check this link for more information.

    All the best,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 11 May 2012 Link to this post

    Hmmm...I see what you mean...but hear me out on why I'd like this classified AS a bug :)

    When I have a combobox I want to give the users a set of values to pick from, I don't expect\want it to be a freeform text input.  If I wanted that, I would have used the AutoComplete instead.

    So when I enable filter: "contains" what I would expect would happen is that it allows the user to filter the list, while still maintaining list integrity, not become a freeform text input....since what they type has no value. 

    Know what I mean?
  10. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 16 May 2012 Link to this post

    Would you at least perhaps consider wrapping your couple lines of code there into a configuration property "allowCustomText" or something?...so we don't have to keep re-implementing this every time?

    The logic almost already exists with the placeholder config element
  11. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 16 May 2012 Link to this post

    Hello Steve,

     
    The ComboBox widget is desined to allow entering a custom value. Setting the filter option specifies the filtering functionality of the DataSource and does not prevent entering of the custom value. I will suggest you use a DropDownList widget, which does not allow custom values.

    I will log you request to our internal system for further consideration.

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 16 May 2012 Link to this post

    Problem with a dropdown though is you can't filter out results...we're talking a combo bound to 250 things right :)...lots to scroll though

    Please consider the feature request, and I'll use your logic to check for a custom value in the meantime

    Thanks Georgi
  13. Vesselin Obreshkov
    Vesselin Obreshkov avatar
    81 posts
    Member since:
    Jan 2010

    Posted 10 Sep 2012 Link to this post

    I believe your request is similar the this UserVoice item: http://feedback.kendoui.com/forums/127393-kendo-ui-feedback/suggestions/2295877-enhance-combobox-autocomplete. Go vote and hopefully they'll enhance those controls soon.



    We too wish the ComboBox could filter only through it's available values and have option to not allow custom values since 99% of the time when people need control like this, they really want a dropdown list that has a quick search/autocomplete of the possible values. In our app, the only place where we need a combobox the way it currently works is in one location - to allow people to either enter their own password/security question or select from pre-defined ones. Every time I put a combobox anywhere I need to explain to people how it works and why it lets them enter "crap that's not there".



Back to Top
Kendo UI is VS 2017 Ready