Support for server-side value filters

I have an idea for the backendless database. I would like the ability to run a regex through a filter, to process the data that comes in. I know the validator is there, but that only returns an error to the front-end. I’d like the ability for users to enter multiple formats of data and have it all cleaned up server side. An example would be a mobile phone number:

I’d like the ability for a user to enter
(123) 456-7890
123-456-7890
1234567890
123.456.7890
123456-7890
or any variation inbetween, and have the filter on the server run a regex to strip out all non-numeric characters.

Something like adding a dropdown here:

image

And giving it the ability to run a regex like this:
/[^0-9]/

Then on the client side, I can run whatever formatting I want when I output those values. setting a default phone number as 123-456-7890

Thoughts?

Hi. Thanks for the idea. We’ll discuss it within a team.
For now you can achieve such a behavior using Business Logic (beforeCreate, beforeUpdate handlers), where you are free to use several regexps and covert values in form you need.

but that only returns an error to the front-end.

Server returns error if the sent data isn’t valid according to the regexp. This error is returned at the sdk level as well, not only on the front-end.

The logic for cleaning up of input values may be not trivial.