Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm creating a edit view inwhich a user can create a article/document. In this edit view there are some fields that are required, but I can't see where you define that a field is required.

For example in a TextField, if this TextField has to be filled in how can you check that it is when the page is saved?

Thanks

Stephen

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You could use the standard ASP.NET Validation Controls like the <asp:RequiredFieldValidator /> control.

<asp:TextBox ID="foo" runat="server"/>
<asp:RequiredFieldValidator ID="fooValidator" ControlToValidate="foo" 
     Text="Field foo is required." runat="server"/>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.