plugins/ProfileExtender/class.profileextender.plugin.php
public function EntryController_RegisterValidation_Handler($Sender) {
      // Require new fields
      $ProfileFields = $this->GetProfileFields();
      foreach ($ProfileFields as $Name => $Field) {
         // Check both so you can't break register form by requiring omitted field
         if (GetValue('Required', $Field) && GetValue('OnRegister', $Field))
            $Sender->UserModel->Validation->ApplyRule($Name, 'Required', $Field['Label']." is required.");
      }
   }
public function EntryController_RegisterValidation_Handler($Sender) {
      // Require new fields
      $ProfileFields = $this->GetProfileFields();
      foreach ($ProfileFields as $Name => $Field) {
         // Check both so you can't break register form by requiring omitted field
         if (GetValue('Required', $Field) && GetValue('OnRegister', $Field))
            $Sender->UserModel->Validation->ApplyRule($Name, 'Required', $Field['Label']." is required.");
      }
   }
public function EntryController_RegisterValidation_Handler ( $ Sender ) { // Require new fields $ ProfileFields = $ this -> GetProfileFields ( ) ; foreach ( $ ProfileFields as $ Name => $ Field ) { // Check both so you can't break register form by requiring omitted field if ( GetValue ( 'Required' , $ Field ) && GetValue ( 'OnRegister' , $ Field ) ) $ Sender -> UserModel -> Validation -> ApplyRule ( $ Name , 'Required' , $ Field [ 'Label' ] . " is required." ) ; } }
Required fields on registration forms.
Required fields on registration forms .