Visual Prolog : Edit Control : Check if string contains numbers

Discussions related to Visual Prolog
Amod Gokhale
Posts: 8
Joined: 6 Mar 2017 16:40

Re:

Unread post by Amod Gokhale » 8 Mar 2017 8:34

Gukalov wrote:Simplier to delete spaces before checking:
if string:hasAlpha(string::replaceAll(Control:getText(), " ", "")) then

But to check if entering name is correct you need something more sirious than just letters&spaces)))
"A m o d Go kh ale" ?!)))

Perfect!!!!!. I used this solution. Don't know how to mark this as accepted answer here. If you are on stack ( kindly update... i have posted tr as well and will mark it as accepted )

Amod Gokhale
Posts: 8
Joined: 6 Mar 2017 16:40

Unread post by Amod Gokhale » 8 Mar 2017 8:36

Hi Harrison,

Thanks for your detail reply, it worked and prevents numbers.

For now went with solution provided by Gukalov as it fits with current system requirement.

Post Reply