Which is better?

I had a question about Stimulux.
I want to create a form validation for my forms. Is it better to write the validation codes in a separate JavaScript file and then call it through the controllers or write it in one controller and call it in the other controllers?

Stimulux or Stimulus?

Although a long time has passed, but I am correcting Stimulus