Meteor.js - simpl-schema issues

This might not be the best place to ask this, if not, my bad.
I’m working on XLSX to XML converter, where the uploaded file XLSX needs to have some mandatory fields, and for that validation I’m using simpl-schema.
I’ve created a Schema in an external file with all the mandatory and optional fields and on my client.js I have an array with the XLSX fields that were inputed by the user.
My objective is to validade my array against my schema, output an error if any madatory field is missing or if any field has a wrong type of input.
Here’s my code to change the input value if it’s wrong, in this case, if the input is a string “Yes” then evaluates it as true, else is false :

myField: {
        type: (Boolean), 
        optional: true,
        custom: function() {
            let a = this.value;
            if (a === "Yes") {
                return a = true;
            }
            else { return a = false }
        }
    },`

I’ve searched the simpl-schema docs on how to this, but I can’t manage to get it working with the examples provided, I’m stuck on this.
Sorry again if it’s the wrong place to ask this question.
Thanks in advance :raised_hand_with_fingers_splayed:

@camperextraordinaire Thanks for the explanation.
I just edited the post with my code, trying to edit a value with simpl-schema.