Form control's Validate method not be called while pasting text on it and leave it.

Hi all,

I have a problem on a StringEdit field (which is not bind to any data source), I use it as a string input field (with a button to do some special job)

and I found that if I type anything on it then then leave it by press tab key or just click any other control, the validate method will be executed as expectation.

but if I paste a string onto it and press Tab or click any other control, it will not trigger validate method.

I know that paste() method will be called when I paste text onto it, but at this time, I can not get the text I pasted on it by this.text() → it is blank.

I was wondering how can I do the validate() while I paste text onto a StringEdit (form control)

many thanks.

I don’t see any such issue. It is being called both the time.
Have you tried to debug? What is your AX version?

Hi Kranthi,

I’m using AX 2012.
I set break point on my validate method, it will not enter it while I using paste text into the edit field and make it leave focus. But if I use keyboard to key in. It will…

I don’t know why it will go like this, i think it is not reasonable.

Thanks
Vincent

It should validate, irrespective of the way you enter the field value (from user interface). It is not mandatory to key everything manually, you can always copy and paste and this it works. Unless you are doing something wrong/different.