Modal form validation not working either.... what is happening

return Section::make('Sytescope Account')
->description('Load your Sytescope API Key. API Key can be found in your project under settings -> Applications API Key.')
->schema( [
TextInput::make('name')->label('Title')
->minLength(3)
->maxLength(255)
->required(),
TextInput::make('email')
->label('Login Email')
->required()
->email()
,
TextInput::make('token')
->minLength(10)
->maxLength(50)
->alphaNum()
->rules(['required'])
->markAsRequired()
->password()
->revealable(),
TextInput::make('domain')
->label('Site')
->prefix('https://')
->suffix('sytescope.com')
->readonly(true)
->visible(function($record){

return $record != null;

}),
return Section::make('Sytescope Account')
->description('Load your Sytescope API Key. API Key can be found in your project under settings -> Applications API Key.')
->schema( [
TextInput::make('name')->label('Title')
->minLength(3)
->maxLength(255)
->required(),
TextInput::make('email')
->label('Login Email')
->required()
->email()
,
TextInput::make('token')
->minLength(10)
->maxLength(50)
->alphaNum()
->rules(['required'])
->markAsRequired()
->password()
->revealable(),
TextInput::make('domain')
->label('Site')
->prefix('https://')
->suffix('sytescope.com')
->readonly(true)
->visible(function($record){

return $record != null;

}),
When I fille out the form it submits and doesn't try to validate the required fields I leave blank... Not sure why this doesn't work when inside a modal.
1 Reply
toeknee
toeknee7h ago
Looks good, have you filled the form on mount first to start the form

Did you find this page helpful?