TrimStrings Middleware is not working?

I add the TrimStrings middleware in the middleware method in the config of the panel, but it does not seem to work. I save a form where I put spaces around a field and these spaces are saved in the database. Anyone has experienced that? Am I doing something wrong?
1 Reply
Tieme
Tieme4mo ago
did you persist the middleware? https://filamentphp.com/docs/3.x/panels/configuration#applying-middleware
->middleware([
// ...
], isPersistent: true);
->middleware([
// ...
], isPersistent: true);