Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 validation 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

like image 892
Raghu Avatar asked Nov 15 '22 08:11

Raghu


1 Answers

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"
                                      />
like image 82
Vadim Gremyachev Avatar answered Jan 20 '23 00:01

Vadim Gremyachev