use Filament\Forms\Components\TextInput; use Filament\Forms\Form; use Filament\Pages\Auth\Register as BaseRegister;
class Register extends BaseRegister { public function form(Form $form): Form { return $form ->schema([ $this->getNameFormComponent(), $this->getEmailFormComponent(), TextInput::make('faculty_code') ->required() ->maxLength(255), $this->getPasswordFormComponent(), $this->getPasswordConfirmationFormComponent(), ]); } }
Question is, how do I run validations on the faculty code field? It should be a valid code (that exists in the faculties table). Would appreciate if someone can point me in the right direction. Thank you!