function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ArnoArno 

Validation ensuring full First Name text field and not initial

I would like to write a validation which ensures that an intial or initials are not entered into the First Name field in my Leads. Only a full name. Can any one help? thanks
Steve :-/Steve :-/
Here's a copy of our Lead Validation Formula, you can hack out whatever you don't need, and change the LEN setting on First Name. 

One question though, how are you going handle valid 2 Letter Names (not that uncommon among Asian Cultures) if you restrict the minimum number of characters in FirstName?  I wouldn't go any lower than LEN(FirstName)<=1, just to be safe.

 



Code:
AND ( 
ISPICKVAL(Industry, ""), 
ISPICKVAL( Region__c , ""), 
LEN(FirstName)=0, 
LEN(LastName)=0, 
LEN(Street)=0, 
LEN(City)=0, 
LEN(State)=0, 
LEN(PostalCode)=0, 
LEN(Country)=0, 
LEN(Website)=0)

 



Message Edited by Stevemo on 01-14-2009 10:49 AM

Message Edited by Stevemo on 01-14-2009 12:50 PM
Steve :-/Steve :-/
One other thing to consider is that some people actually prefer to be called by their Nickname, or Initials.  So if you are going to require Full First Name, then you probably want to create a custom Nickname, or Preferred Name field.  Otherwise you're going to have users calling their contacts saying;

BlankBODY { MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; FONT-FAMILY: Arial, Helvetica } P.msoNormal { MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman" } LI.msoNormal { MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman" }

"Hi Theodore, How's it going Theodore?  Have you looked over that proposal yet Theodore?"

meanwhile the client is thinking  "I HATE that name...  Why doesn't he call me T.J. like everyone else???"

 
ArnoArno
Stevemo, thanks. I am going to try your solution.
ArnoArno

Hi once again Stevemo, please excuse my ignorance as I am new to Salesforce.

I have inserted the following into the validation formula box in salesforce and it does not trigger an eror message when I enter a single character in the FirstName field:

LEN(FirstName)>1

What else must accompany this code?

Thanks

ArnoArno
It works! thanks
LauraSCLauraSC

Hi, I am also trying to implement this.  I want the first name field to have to contain more than 1 character, to prevent people entering intials instead of complete first names. 

 

FirstName="" works to prevent a new contact record being saved without an entry in this field.  However I am trying to combine this with LEN(FirstName)>1 and it's not working.

 

AND (

FirstName=""

LEN(FirstName)>1) gives me an error that a ) is missing.  Making each rule a separate rule doesn't work either - i just can't get the character one to work.  Even when it saves properly, it I try and create a contact record with an intial in the first name field, SF still lets me save it. Gah! Where am I going wrong?!

 

Thanks :)