snippet-library icon indicating copy to clipboard operation
snippet-library copied to clipboard

`gw-double-confirmation-fields.php`: Updated snippet to use custom validation message.

Open saifsultanc opened this issue 2 years ago • 0 comments
trafficstars

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2214432238/46871?folderId=3808239

Summary

Added custom validation message to this snippet. This can be used as follows:

register_confirmation_fields( 404, array( 3, 4 ), "Please compare the values." );
register_confirmation_fields( 406, array( 1, 3 ), "Please correct these values" );
register_confirmation_fields( 406, array( 4, 5 ), "These should also match" );

Here is a quick screencast of the update: https://www.loom.com/share/ad511b6c0abf47d4a86b7965446a5889

saifsultanc avatar Apr 24 '23 14:04 saifsultanc