Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.67 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Sharepoint: Sharepoint custom list validation
  2. $('input[title="MyColumnName"]').keyup(function () {
  3.         this.value = this.value.replace(/[^a-zA-Z]/g, '');
  4.     });
  5.        
  6. <%@ language="C#" %>
  7.     <form id="form1" runat="server">
  8.         <asp:TextBox ID="txtName" runat="server"/>
  9.         <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
  10.         <asp:RegularExpressionValidator ID="regexpName" runat="server"    
  11.                                         ErrorMessage="This expression does not validate."
  12.                                         ControlToValidate="txtName"    
  13.                                         ValidationExpression="^[a-zA-Z'.s]{1,40}$" />
  14.     </form>