#1 2016-08-17 20:37:59

mauriciobs
Member
From: Brazil
Registered: 2016-05-11
Posts: 16

How not allow spaces in field content?

I'm trying to set a validation using InternalDefineModel and AddFilterOrValidate('LogonName', TSynValidatePatternI.Create('[! ]')). Which would be the correct pattern to disallow space characters?

Last edited by mauriciobs (2016-08-17 20:38:30)

Offline

#2 2016-08-18 06:56:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,657
Website

Re: How not allow spaces in field content?

Did you try with TSynValidateText and MaxSpaceCount=0 ?

Online

#3 2016-08-18 13:02:51

mauriciobs
Member
From: Brazil
Registered: 2016-05-11
Posts: 16

Re: How not allow spaces in field content?

Thanks for the quick reply. Your tip worked very well.
AddFilterOrValidate('logonname', TSynValidateText.Create('{"MinLength":5,"MaxSpaceCount":0}'));

Offline

Board footer

Powered by FluxBB