Sanitizing forms in vibe.d. How?
Nicholas Wilson via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Dec 11 16:42:54 PST 2016
On Sunday, 11 December 2016 at 18:30:54 UTC, aberba wrote:
> In php, I use built-in functions like
> filter_var(FILTER_VALIDATE_EMAIL, $email). There are other
> constants for different data types.
>
You can enforce that the string that you receive is an email
address with `isEmail` from `std.net.isemail`
> Again, there is mysqli_real_escape_string() for escaping SQL
> injection/harmful characters.
>
>
> What are my options in vibe.d or even D?
What sql library are you using? there is probably a function in
that somewhere, that does sanitisation, or use prepared
statements.
More information about the Digitalmars-d-learn
mailing list