#### Welcome!

We are currently working on the forum. For the short-term, all forum content will be in read-only format. We apologize for the interruption and look forward to collaborating with you shortly. All the best in your research!

# Validation expression syntax

Posts: 65
Good Day;
I want to write a few validation expression for the following:
1- the time ...including AM & PM
2- different numbers , I need to define the number of digits for each
EX.Define the digits: medical record number between 3 to 7 digits , more than 7 digits OR less than 3 digits wrong?
Define the range : Age between 2 to 12 months ?
Also, is there any way to calculate the age from Date of Birth ?
Thanks!
--
All the Best
Aisha Albugami
Bioinformatics & Database Section
King Abdullah International Medical Research Center
King Abdulaziz Medical City-National Guard Health Affairs
Saudi Arabia , Riyadh
Tel# +966 1 2520088 Ext# 49890
http://www.kaimrc.med.sa/

## Comments

• Posts: 65
Good Day;
I want to write a few validation expression for the following:
1- the time ...including AM & PM
2- different numbers , I need to define the number of digits for each
EX.Define the digits: medical record number between 3 to 7 digits , more than 7 digits OR less than 3 digits wrong?
Define the range : Age between 2 to 12 months ?
Also, is there any way to calculate the age from Date of Birth ?
Thanks!
--
All the Best
Aisha Albugami
Bioinformatics & Database Section
King Abdullah International Medical Research Center
King Abdulaziz Medical City-National Guard Health Affairs
Saudi Arabia , Riyadh
Tel# +966 1 2520088 Ext# 49890
http://www.kaimrc.med.sa/
• Posts: 5
1- Time <=12 , its AM
Time >12 , its PM
2- you must use function like: len(number) that return the length of string.
Expression: len(num) > 3 & len(num)<7
Age: 2< age <12
3- Do you need the exact age with months and days? Or only the years?
Sent: Monday, December 27, 2010 1:35 PM
To: [email protected]; [email protected]
Subject: [Users] Validation expression syntax

Dear All,
Good Day;
I want to write a few validation expression for the following:
1- the time ...including AM & PM
2- different numbers , I need to define the number of digits for each
EX.Define the digits: medical record number between 3 to 7 digits , more than 7 digits OR less than 3 digits wrong?
Define the range : Age between 2 to 12 months ?
Also, is there any way to calculate the age from Date of Birth ?
Thanks!
--
All the Best
Aisha Albugami
Bioinformatics & Database Section
King Abdullah International Medical Research Center
King Abdulaziz Medical City-National Guard Health Affairs
Saudi Arabia , Riyadh
Tel# +966 1 2520088 Ext# 49890
http://www.kaimrc.med.sa/

This Email and any files transmitted may contain confidential and/or privileged information and is intended solely for the addressee(s) named. If you have received this information in error, or are being posted by accident, please notify the sender by return Email, do not redistribute this email message, delete it immediately and keep no copies of it. All opinions and/or views expressed in this email are solely those of the author and do not necessarily represent those of NGHA. Any purchase order, purchase advice or legal commitment is only valid once backed by the signed hardcopy by the authorized person from NGHA.
• Posts: 276 ✭✭
Hi,

The medical record number restriction can also be implemented via regular expressions: regexp:/[0-9]{3,7}/

Hope this helps,

Mihai
Sent: Monday, December 27, 2010 5:30 AM
To: '[email protected]'
Subject: RE: [Users] Validation expression syntax

1- Time <=12 , its AM
Time >12 , its PM
2- you must use function like: len(number) that return the length of string.
Expression: len(num) > 3 & len(num)<7
Age: 2< age <12
3- Do you need the exact age with months and days? Or only the years?
Sent: Monday, December 27, 2010 1:35 PM
To: [email protected]; [email protected]
Subject: [Users] Validation expression syntax

Dear All,
Good Day;
I want to write a few validation expression for the following:
1- the time ...including AM & PM
2- different numbers , I need to define the number of digits for each
EX.Define the digits: medical record number between 3 to 7 digits , more than 7 digits OR less than 3 digits wrong?
Define the range : Age between 2 to 12 months ?
Also, is there any way to calculate the age from Date of Birth ?
Thanks!
--
All the Best
Aisha Albugami
Bioinformatics & Database Section
King Abdullah International Medical Research Center
King Abdulaziz Medical City-National Guard Health Affairs
Saudi Arabia , Riyadh
Tel# +966 1 2520088 Ext# 49890
http://www.kaimrc.med.sa/

This Email and any files transmitted may contain confidential and/or privileged information and is intended solely for the addressee(s) named. If you have received this information in error, or are being posted by accident, please notify the sender by return Email, do not redistribute this email message, delete it immediately and keep no copies of it. All opinions and/or views expressed in this email are solely those of the author and do not necessarily represent those of NGHA. Any purchase order, purchase advice or legal commitment is only valid once backed by the signed hardcopy by the authorized person from NGHA.
This discussion has been closed.