numerus/pkg
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
..
company.go Create validation function for SQL domains and for phones 2023-07-03 11:31:59 +02:00
contacts.go Create validation function for SQL domains and for phones 2023-07-03 11:31:59 +02:00
dashboard.go Fix passing company ID to expenses chart query 2023-06-21 09:47:23 +02:00
db.go Allow importing contacts from Holded 2023-07-03 00:05:47 +02:00
expenses.go Remove unused company parameter from mustCollectExpenseEntries 2023-07-02 20:06:45 +02:00
form.go Create validation function for SQL domains and for phones 2023-07-03 11:31:59 +02:00
htmx.go Use HTMx to add product rows “inline” in the invoice form 2023-04-24 02:00:38 +02:00
invoices.go Split contact relation into tax_details, phone, web, and email 2023-06-30 21:32:48 +02:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Reduce the amount of useless data in request’s log 2023-06-13 16:05:40 +02:00
login.go Log the remote address, and only trust localhost proxies 2023-06-13 14:21:54 +02:00
pgtypes.go Split contact relation into tax_details, phone, web, and email 2023-06-30 21:32:48 +02:00
products.go There is no need for array_to_string() in tags 2023-05-27 21:36:10 +02:00
profile.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
quote.go Split contact relation into tax_details, phone, web, and email 2023-06-30 21:32:48 +02:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Allow importing contacts from Holded 2023-07-03 00:05:47 +02:00
template.go Internationalize and localize the home template 2023-06-16 10:58:40 +02:00