You can achieve the desired result by attaching a suitable on-exit macro to the formfield. For example:
Dim StrNm As String
Sub StrChk()
With ActiveDocument.FormFields("Text1")
If (Left(.Result, 1) = ",") Or (Right(.Result, 1) = ",") Or (InStr(.Result, ",") = 0) Then
StrNm = .Name
MsgBox "Invalid Input", vbInformation
Application.OnTime When:=Now + 1 / 8640000, Name:="ReselectFmFld"
End If
End With
End Sub
Sub ReselectFmFld()
ActiveDocument.Bookmarks(StrNm).Range.Fields(1).Result.Select
End Sub
where 'Text1' is your formfield's internal bookmark name. With the above code, your formfield input is validated when it is exited and, if the data are invalid the user is notified and the formfield re-selected.
Cheers
Paul Edstein
[MS MVP - Word]