1
votes

Can anybody tell me how we write validation formula for "single line of text" fields in SharePoint list that it accepts characters only.

3
this belongs on sharepoint.stackexchange.comStefan

3 Answers

3
votes

I think without SP Designer is this not possible. There are following functions available: ISBLANK ISERR ISERROR ISLOGICAL ISNA ISNONTEXT ISNULL ISNUMBER ISTEXT See this reference: http://office.microsoft.com/en-us/sharepoint-foundation-help/is-functions-HA100405908.aspx

0
votes

JQuery to the rescue again I'd have thought: I use this this type of entry in forms where I want to constrain input values:

    $('input[title="MyColumnName"]').keyup(function () {
        this.value = this.value.replace(/[^a-zA-Z]/g, '');
    });
-1
votes

Try this code

<%@ language="C#" %>
    <form id="form1" runat="server">
        <asp:TextBox ID="txtName" runat="server"/>
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
        <asp:RegularExpressionValidator ID="regexpName" runat="server"     
                                        ErrorMessage="This expression does not validate." 
                                        ControlToValidate="txtName"     
                                        ValidationExpression="^[a-zA-Z'.\s]{1,40}$" />
    </form>