People Picker AllowEmpty Property
I am using the people picker user control of SharePoint in my aspx page. I have set the AllowEmpty property of people picker control as false.
But, still the required field validat开发者_JAVA百科ion is not occurring for the control. I don't want to use a required field validation control explicitly for validating this. Any insights?
Regards, Raghuraman.V
In order to enable/disable validation for Entity Editor based controls (like People Editor) the following properties should be specified in combination:
- AllowEmpty - represents whether an empty entity is allowed
- ValidatorEnabled - represents whether a Validator is enabled
So, in your case to disable empty values, ValidatorEnabled="true"
should be provided also like shown below:
<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
SelectionSet="User,SecGroup"
/>
精彩评论