Sharepoint Column Validation – Regex

Hi @Ruan Swart ,

Welcome to Q&A Forum!

According to my research and testing, SharePoint Column Validation cannot support such a complex RegEx Expression. Because the Validation Formula must be 1024 characters or fewer.

124880-c1.png

For example:

[A-Z]{4}- requires the following Formula:

=IF(AND(LEN(Test)=5,CODE(MID(Test,1,1))>64,CODE(MID(Test,1,1))<91,CODE(MID(Test,2,1))>64,CODE(MID(Test,2,1))<91,CODE(MID(Test,3,1))>64,CODE(MID(Test,3,1))<91,CODE(MID(Test,4,1))>64,CODE(MID(Test,4,1))<91,MID(Test,5,1)="-"),TRUE,FALSE)  

124945-c3.png

Thanks,
Echo Du

=========================================

If an Answer is helpful, please click “Accept Answer” and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Read more here: Source link