F
Filamentβ€’11mo ago
FranklySteve

maxLength has stopped cutting off text?

HI, not sure why, or when, but for some reason one of my text fields has stopped cutting off text. It validates on save, but doesn't actually prevent text from going beyond 16 chars when typing within it, which it used to, any ideas please? I've pasted the code below, which feels silly, but might help! Thanks!
TextInput::make('reference')
->maxLength(16)
->hint('Max 16 characters')
->required(),
TextInput::make('reference')
->maxLength(16)
->hint('Max 16 characters')
->required(),
3 Replies
FranklySteve
FranklySteveOPβ€’10mo ago
Hi, any ideas please? πŸ™‚
Blackpig
Blackpigβ€’10mo ago
IIRC maxLength is for validation and length will restrict the field size Ah no sorry - just checked the docs - length sepcifies an exact length, my bad
FranklySteve
FranklySteveOPβ€’10mo ago
Thanks for trying
Want results from more Discord servers?
Add your server