Validate the data, but save non-validated version
-
Not sure if anybody has come across wanting to do this, but I’d like to be able to validate my data on the front end (wp-admin or acf/front-end form) but save the raw version of it to the database. For example:
Phone number validates to (123) 456-7890 x12345
Save to db as 1234567890×12345.
Then run the masked-input.js on the front end when printing the data.
For my data import, I feel that this would be better and cleaner. But maybe I’m only concerned about that one moment in time…maybe somebody should talk me off the ledge?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Validate the data, but save non-validated version’ is closed to new replies.