jordi fita mas ef8f40e734 Create validation function for SQL domains and for phones
When i wrote the functions to import contact, i already created a couple
of “temporary” functions to validate whether the input given from the
Excel files was correct according to the various domains used in the
relations, so i can know whether i can import that data.

I realized that i could do exactly the same when validating forms: check
that the value conforms to the domain, in the exact same way, so i can
make sure that the value will be accepted without duplicating the logic,
at the expense of a call to the database.

In an ideal world, i would use pg_input_is_valid, but this function is
only available in PostgreSQL 16 and Debian 12 uses PostgreSQL 15.

These functions are in the public schema because initially i wanted to
use them to also validate email, which is needed in the login form, but
then i recanted and kept the same email validation in Go, because
something felt off about using the database for that particular form,
but i do not know why.
2023-07-03 11:31:59 +02:00
..
2023-03-26 13:51:57 +02:00
2023-07-02 02:08:45 +02:00
2023-03-11 20:58:20 +01:00
2023-03-26 13:51:57 +02:00
2023-04-30 16:06:16 +02:00
2023-02-09 11:42:31 +01:00
2023-02-04 11:32:39 +01:00
2023-03-10 14:02:55 +01:00