regex validate field; allowed is empty, null or one word max 30 ch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have got the following problem:
User fills in excel sheet, this is loaded in Acces.
After this I run a validation tool to validate the field formats.

One fields is allowed to be null, empty (length = 0) and max 30 chars.
I use the following expression: ^.{0,30}\b

It seems that this is not working as I would expect when fields are empty or
""...

Any ideas...?

Cheers
 
Ludovic,

There are also other fields that needs to be validated.
All validation rules are stored in a table as well.
I decided to do all validations the same way: using regex...

I know your solution, checking the length, is also possible.
But it shouldn't be that hard to define this using regex....
 
Back
Top