There's this cool new feature in SP 2010 where you can specify a custom validation formula and an error message for any column.
For some reason it doesn't work when you replace the default NewForm.aspx for a list with a custom form using SharePoint designer's "Create New List Form -> New Item Form". It creates an aspx where it puts a FormField control for every field of the selected content type instead of the ListFormWebpart which iterates and renderes every field with no fields explicitly mentioned on the page.
The code for every field on a just-created custom form is similar to the following (just to illustrate)
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>PhoneNumber</nobr></H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff4{$Pos}" ControlMode="New" FieldName="PhoneNumber" __designer:bind="{ddwrt:DataBind('i',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@PhoneNumber')}"/>
<SharePoint:FieldDescription runat="server" id="ff4description{$Pos}" FieldName="PhoneNumber" ControlMode="New"/>
</td>
</tr>
The problem is that with a "Create New List Form -> New Item Form" form the (new sharepoint 2010) formula validation doesn't work: it passes the validation on the form only failing on the save stage resulting in an error page.
Is it in any way configuarable with the FormField control or can I in any other way take benifit of this new sp2010 validation mechanism when using a custom (non-ListFormWebpart) item pages or do I have to write custom GUI validation in this case?
Thanks!