Remove default Validation for Autocomplete

5 posts, 0 answers
  1. Karthick
    Karthick avatar
    3 posts
    Member since:
    May 2015

    Posted 24 Feb Link to this post

    Hi All , 

     

    I want to remove the default validation given by the kendo ui for Autocomplete.Please help me in achieving this.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1266 posts

    Posted 24 Feb Link to this post

    Hello Karthick,

    Could you elaborate more or demonstrate (in a dojo example for instance) what you mean by "default validation" for the AutoComplete and how do you trigger the widget's validation in your specific scenario?

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Karthick
    Karthick avatar
    3 posts
    Member since:
    May 2015

    Posted 24 Feb Link to this post

    Thank you for your kind reply, 

     

    I am using kendo inline grid, and this is my column on which i have an autocomplete editor for it. even i have set required to false in model field declaration also. but when i am creating a new record and trying to save the record leaving poslip(autocomplete field ) as null , it is getting validated. guess this is a default validation for some editors in kendo like dropdownlist will validate by default when not selected. Here I dont need this validation. kindly guide me how to remove this validation.

     

    ---------------- // model field declaration  --------------

    poslip : { type: "string",validation: { required: false}} 

    ------------------// column declaration----------------------

    {
                ffield: "poslip",
                title: "PO  Slip",
                filterable: false,                 
                editor:AutoCompleteEditor,                    
                autowidth:true }


    -------------- editor function-------------------------

    function AutoCompleteEditor(container, options) {

     var dataSource = new kendo.data.DataSource({
    transport: {
    read: crudServiceBaseUrl +"getPOSlipNumbers/"+cn+"/"+on+"/"+ot+"/"+sn      
    },
    });
    $('<input required="required" name="' + options.field + '"/>')

    .appendTo(container)
    .kendoAutoComplete({
    dataTextField: "poslip",
    filter: "startswith",
    minLength: 2,
    dataSource:dataSource,
    placeholder: "Select POSlip"
    });
    }
    }

  4. Karthick
    Karthick avatar
    3 posts
    Member since:
    May 2015

    Posted 24 Feb in reply to Ivan Danchev Link to this post

    Please check my update on my question. 

     

    Thank you

  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1266 posts

    Posted 27 Feb Link to this post

    Hello Karthick,

    Have you tried removing the required attribute from the AutoComplete's input? From the code you posted I see you are appending it with this attribute to the container in your AutoCompleteEditor function:
    $('<input required="required" name="' + options.field + '"/>')


    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top