How to pass value into the custom message (Simpl Schema)?

I want to pass any values into the custom message

   issueDate: {
        type: String
    expiryDate: {
        type: String
        custom: function () {
            if (this.value < this.field('issueDate').value) {
                // Want to pass this.field('issueDate').value into message below
                return 'expiryDateGt';

// Custom message
    "expiryDateGt": "[label] must be greater then issue date [value].",

Did yo end up working out how to do this? I’ve read and reread autoforms, simple schema section about custom validation messages and for the life of me can’t work out how to replace the default “XXXXX failed regular expression validation” message.

To clarify, the examples seem to want you to declare a global message type and then perform your own custom validation by a custom function and then use your global message.
However, all I want to to is piggy back off the existing regex validation but overwrite the error message for that one field in that one schema.

I finally comprehended the doco:

Schema.<schemaName>.messages({'regEx expiryDate': [{msg:'<custom message here>'}]})

and also realised you were asking a different question to me, sorry for the hijack, at least it bumped your question :wink: