Welcome Guest, Not a member yet? Register   Sign In
{field} placeholder does not get replaced with field name in a custom error message
#4

(This post was last modified: 04-17-2020, 09:28 AM by Gary.)

I think doing it that way forces all the fields to be pushed into an array, so that in your custom function (now defined like this: function no_links(string $string, string $fields = NULL, array $data = NULL, string &$error = NULL) gets this array ($data), that has all the field names in it, from which you can extract {field} and insert it into the $error string your function is returning.

I stand under possible correction, but as far as I'm aware, the returned string is not processed any further, and pretty much gets displayed as is (with {field}).
Reply


Messages In This Thread
RE: {field} placeholder does not get replaced with field name in a custom error message - by Gary - 04-17-2020, 09:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB