validationMessages within createOptionsFrom not working as expected

Hi All,

->createOptionForm([
    TextInput::make('name')
        ->label('Job Title')
        ->maxLength(255)
        ->required()
        ->validationMessages([
            'required' => 'A job title is required.',
            'max' => 'Job title cannot exceed 255 characters.'
        ]),
    TextInput::make('acronym')
        ->label('Acronym')
        ->nullable()
])

this produces the screenshot with orange ! icon, I'd expect it to show with red text like the other screenshot!? Any ideas?

Cheers, Bot
image.png
image.png
Solution
@awcodes, We have managed to work this one out:

TextInput::make('name')
  ->label('Job Title')
  ->rules(Rule::requiredIf(true)),
Was this page helpful?