How can we stop Pasting Alphabets and special characters in Numeric field element in vFlow?

As per current scenario , In vFlow in numeric field we are able to paste alphabets and special characters and the field doesn’t gives any error.

Is there any solution that we just paste numbers only in numeric element in form? example - when the user paste any value containing characters (example - 12ab@ ) then just 12 will paste in the field OR it doesn’t allow user to execute paste.

28 Likes

Hi Nikhil, Welcome to the community!

Please explain which element you are selecting as it is working as intended if I create an element of type Number in fieldset.

I am only able to type in Numbers not alphabets.

2 Likes

Hi nikhil,
I don’t think the field validates for special character in a number input field when pasted. But, one workaround is to run REGEX_MATCH BR function on the next button and not allow user to move forward if false.

Or a better way is to disable copy and paste action on the form from the app config. you can find it under Disable copy paste in App tab in minidesigner:

3 Likes

Hi Vinay,

I am using Number element in fieldset.
Yes, we can type Numbers only in Numeric fieldset, but we can paste the special characters and alphabets.

25 Likes

Hi Abhinav,
The fields are validated when we paste any special character in it , but if we use Regex , yes it throws an error, but if we have checked RUN AS INVALID checkbox in configuration of number element, then the onInput task is performed. and if there are any BR’s of mathematical operations in onInput task and we have pasted special characters in the field then it compares that value to some mathematical operator(eg- >, <) then in that case application breakdown comes.

As per our requirement we don’t have to disable copy paste in the application, It should be enabled.

28 Likes

@Abhinav_mehta Mere disabling the copy paste won’t solve the purpose as most of the clients want to be able to copy paste to save time.
Also, there is no option to disable copy paste on a specific field, rather it just disables the copy paste in the entire application.

3 Likes