Skip to content

Fix: validate() on forms where is attached non-form component causes error - #86

Closed
ovlach wants to merge 1 commit into
nette:masterfrom
nubium:master_fix_validatable
Closed

Fix: validate() on forms where is attached non-form component causes error#86
ovlach wants to merge 1 commit into
nette:masterfrom
nubium:master_fix_validatable

Conversation

@ovlach

@ovlach ovlach commented Jul 3, 2015

Copy link
Copy Markdown
  • bugfix
  • documentation - not needed
  • BC break - no

validate() on forms where is attached non-form component causes error - older nette/form using getControls() method where is interface checking.

Now this is not possible, so i create special IValidatable interface which marks controls and container as validatable and checking it.

@ovlach ovlach changed the title Fix: validate() on forms where is attached non-form control causes error Fix: validate() on forms where is attached non-form component causes error Jul 3, 2015
@fprochazka

Copy link
Copy Markdown
Contributor

I really like the solution, but I'm not 100% sure if this is not a bc break.

@dg

dg commented Jul 3, 2015

Copy link
Copy Markdown
Member

Related to 347c545

@milo

milo commented Mar 29, 2016

Copy link
Copy Markdown
Member

@ovlach The interface is needless here. Can you simplyfied it by adding check that component is form Control or IContainer?

@Majkl578

Copy link
Copy Markdown
Contributor

I like the interface.
@milo: What you suggest is not correct as it merely relies on the method of same name being present, not enforced by any object contract.

@dg

dg commented Mar 30, 2016

Copy link
Copy Markdown
Member

Validation will be redesigned in future in another way and this interface is not (will not be) suitable.

@dg
dg force-pushed the master branch 2 times, most recently from 9e359e6 to fa84d63 Compare April 5, 2016 23:23
@dg
dg force-pushed the master branch 2 times, most recently from 3c1619a to 31bc0a3 Compare April 11, 2016 01:44
@dg
dg force-pushed the master branch 7 times, most recently from 6b04b51 to d1c30d6 Compare April 21, 2016 13:03
@dg
dg force-pushed the master branch 5 times, most recently from fd381fb to b70e5da Compare May 19, 2016 00:28
@dg
dg force-pushed the master branch 5 times, most recently from 9470e5f to 4d5f6c3 Compare June 7, 2016 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants