In the following example, the ScriptFile parameter is marked with an @Valid annotation.
ScriptFile
@Valid
What does @Valid annotation do?
IIRC @Valid isn't a Spring annotation but a JSR-303 annotation (which is the Bean Validation standard). What it does is it basically checks if the data that you send to the method is valid or not (it will validate the scriptFile for you).