ISO20022 describes PmtInfId as follows:

Presence:  [1..1]
Definition:  Unique identification, as assigned by a sending party, to unambiguously identify the payment information group within the message.
Data Type:  Max35Text, Format:  maxLength: 35, minLength: 1
To conclude, the element is mandatory by the schema and it has to be unique. Uniqueness is checked by the validator unless otherwise decided with the bank