Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to validate if the text entered in a text column is written in UPPER CASE.

share|improve this question
1  
Could you be more specific? Is this in code? in javascript? as a field validator? as a timer job? as an event handler? In an Infopath form? –  Dave Wise Jun 14 '12 at 18:55
    
would it be one word or series of words (sentence) and are numerals included ? –  Supriyo SB Chatterjee Jun 14 '12 at 19:06
    
Sorry, I need to validate if a column single line of text type is filled in UPPER case. i.e. if somebody writes elap this should be validated to be ELAP. i guess this would be using a column validator field. –  Eloy Alfaro Jun 14 '12 at 21:33
add comment

2 Answers

up vote 1 down vote accepted

In my case I wanted to validate a 4 to 5 field Identifier named IS. The IS field should contain 4 to 5 Upper case letters. I did it using ASCII code. Sum must return a value of 12. lower case letters sum less than 12, in that case sentence returns false:

=IF(((CODE(MID(IS,1,1))>47)+(CODE(MID(IS,1,1))<58)+(CODE(MID(IS,1,1))>64)+(CODE(MID(IS,1,1))<91)+(CODE(MID(IS,2,1))>47)+(CODE(MID(IS,2,1))<58)+(CODE(MID(IS,2,1))>64)+(CODE(MID(IS,2,1))<91)+(CODE(MID(IS,3,1))>47)+(CODE(MID(IS,3,1))<58)+(CODE(MID(IS,3,1))>64)+(CODE(MID(IS,3,1))<91)+(CODE(MID(IS,4,1))>47)+(CODE(MID(IS,4,1))<58)+(CODE(MID(IS,4,1))>64)+(CODE(MID(IS,4,1))<91))=12,TRUE,FALSE)

The formula verifies if the letters are between A~Z excluding from a~z,0~9.

i.e. Writing in the IS field the identifier "elap" {8} returns false Writing "ELAP" {12} returns True

In this case this worked just fine, but i'm still open to improvements. Thanks for helping

share|improve this answer
add comment

You'll probably need something similar to this - http://sharepointsolutions.com/sharepoint-help/blog/2011/12/how-to-validate-strict-text-formats-in-sharepoint-2010/

You'll find examples on how to validate on upper case strings by googling.

Ricky Spears has written good blogs about how to create validation regexs for Column Validation - Read more here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.