The @Valid annotation plays vital role in validating DTO's / Value Objects where there are multiple attributes inside them that may need validations like @notNull, @length, @max etc.,. However as String doesnt have such attributes and it is a library class, you wont be able to specify what validations to perform on its internal attributes.
Solution 1: You can ignore trying to use @Valid over a primitive class like String
Solution 2: You can create a custom annotation based validator in case if you have any specific validations to perform.