Date validation
Publicado em 23/05/2022 01:21
Comment this post
Transcription ↓
real story;
string sender = "Vitor Amaral de Melo";
Dev: Alonso, get the form I sent you and write a validator to check the year the user type to not allow a wrong year!
Alonso: Ok!
(A time later...)
Code:
if ($row_year[0] != '1969' &&
$row_year[0] != '' &&
$row_year[0] != '0000' &&
$row_year[0] != '1916' &&
$row_year[0] != '0216' &&
$row_year[0] != '0215' &&
$row_year[0] != '0206' &&
$row_year[0] != '0162' &&
$row_year[0] >= 2017 &&
$row_year[0] <= 2019) {
Dev: PLOP!
Dev: Alonso! Please, do me a favor... Check down there and see if this is a real story...
--
T-shirt: waaaat