I've created a module which adds an additional field to the checkout, called 'email-confirm'. I want to check that the value in this field is equal to the first email entry, but I'm unsure how to do this.
The registration form is worth having a look over it uses the following:
So based on that, if you have a template you should add a specific validator for equalTo and the target which you wish to compare it to.
If your using it through xml to build your form similar to the checkout I expect that you can add it as an item eg:
<item name="validation" xsi:type="array"> <item name="equalTo" xsi:type="string">#target</item> </item>
The above I've not verified however but believe that way should work.