We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

numericTextBox allows to paste invalid values in strict mode

Greetings.

I have a numericTextBox as a field editor in my grid. 

<ej-grid id="Grid" 
        [dataSource]="syncJobs" 
        [editSettings]="{'allowEditing':'false', 'editMode':'batch', 'showConfirmDialog':false}"
        (cellSave)="saveRecord($event)"
            <e-columns>
                <e-column field="id" [visible]="false" [isPrimaryKey]="true"></e-column>
                <e-column field="duration" editType="numericedit" [editParams]="{'decimalPlaces': 2, 'minValue': 0}" headerTextAlign="center" headerText="Делал часов"></e-column>
            </e-columns>
        </ej-grid>

The textbox works perfectly when user tries to manyally input the wrong values — values outside of min and max ranges, strings and other. However, if user copies the invalid value, and then pastes it into the field, then the numerictextbox does not prevent it. If for strings it simply returns NaN, it does not react for value outside of min-max ranges. Therefore, I have to validate the field manually, and that is not perfect, if there's easier ways.

Also concerning, that even though the field value is supposed to be numerical (int or float or other), the empty numeric text box returns empty string "" as a value. Again, it makes it neccessary to manually validate all the inputs.

I assume this is the problem of all textboxes, and not just numerical one. I have noticed similar behaviour on ej.datePicker.

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team March 13, 2017 12:32 PM UTC

Hi Alex,   
   
Query 1: NumericTextBox allows to paste invalid values in strict mode   
   
We have analyzed your Query. We can able to reproduce the reported issue in our end. And the fix for this issue will be available in our upcoming Essential studio volume 1 service pack 2 release which is expected to rolled out in the end of this month.    
   
Please be patient until then.   
   
Query 2:  The empty numeric text box returns empty string "" as a value   
   
We have analyzed your query. We would like to inform you that, this is a general behavior of the normal Textbox and it is not an issue.   
   
Regards,   
Seeni Sakthi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon