I'm trying to set a several fields to required but it doesn't seem to work.
I can still change and save a record when these fields are not entered.
I'm using the following code:
The code should work. Please check the browser console for the errors and share the screenshot. Probably there are other lines of the code that breaks the logic.