Answer the question
In order to leave comments, you need to log in
Why is form validation failing in symfony 4?
Hello, tell me please.
Why is my form not validating?
the problem is here
the form itself is problematic. I think the problem is in the title.
<select name="company_card[access_comp_banks][{{ loop.index0 }}][is_short_application]" class="select">
<option value="0">Стандартная форма анкеты для передачи в банк</option>
<option value="1" {{ isShortApplication ?? 'checked' }}>Короткая форма анкеты для передачи в банк</option>
</select>
/**
* @ORM\OneToMany(targetEntity="App\Entity\AccessCompBank", mappedBy="company", cascade={"persist"})
*/
private $accessCompBanks;
public function __construct()
{
$this->accessCompBanks = new ArrayCollection();
}
/**
* @return Collection|AccessCompBank[]
*/
public function getAccessCompBanks(): Collection
{
return $this->accessCompBanks;
}
public function addAccessCompBank(AccessCompBank $accessCompBank): self
{
if (!$this->accessCompBanks->contains($accessCompBank)) {
$this->accessCompBanks[] = $accessCompBank;
$accessCompBank->setCompany($this);
}
return $this;
}
public function removeAccessCompBank(AccessCompBank $accessCompBank): self
{
if ($this->accessCompBanks->contains($accessCompBank)) {
$this->accessCompBanks->removeElement($accessCompBank);
// set the owning side to null (unless already changed)
if ($accessCompBank->getCompany() === $this) {
$accessCompBank->setCompany(null);
}
}
return $this;
}
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $is_short_application;
public function getIsShortApplication(): ?int
{
return $this->is_short_application;
}
public function setIsShortApplication(?int $is_short_application): self
{
$this->is_short_application = $is_short_application;
return $this;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question