0
I want the message to appear when the user enters no date or the initial date is longer than the final date. The code I made was this:
/**
* @Assert\True(message = "Erro! Verifique as horas. Data inical não pode ser maior que a data final.")
*/
public function isHoraFim()
{
if ($this->horainicial > $this->horafim)
{
return false;
}
else
{
return true;
}
if ($this->horainicial || $this->horafim)
{
return false;
}
return $this->horainicio < $this->horafim;
}
But the error message always appears, except when the user inserts no date.
$this->horafim
would be$this->horafinal
?– Rodrigo Rigotti
it should be the end I’ve already changed, but it’s still not working well
– Catarina Silvestre
What type of properties(variables)? It has how to show their definition, how you are treating the data after the user enters the hours?
– Adir Kuhn