You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename "lens" to "scratch". Other suggestions include "tunnel", "gate", "prism", "source", etc. but below discussion will use "scratch".
No error on target variable. Binders can distinguish variables and scratches. A binder (e.g. the number binder) creates a scratch as convenience only when needed. The programmer can bind to an error only if they explicitly created the scratch for it.
No declarative validation, e.g., toModel, toView, validate in a data-bind attribute. The programmer must create a scratch to add custom validation. We will reserve the option to allow, in the future, declarative addition of custom validation.
Validating binders prepend their validation when binding to an existing scratch. It is an (undiagnosed) error to duplicate a binder's validation when creating a scratch for the binder. For example,
<inputdata-bind="number: y">
vary=hd.scratch(x).number().min(0);// wrongvary=hd.scratch(x).min(0);// right
Validator conveniences should be extensible. Programmers should be able to extend new scratch proxies with custom validators.
.outgoing should be variadic. When called with multiple validators, they should all be appended.
The text was updated successfully, but these errors were encountered:
gfoust
pushed a commit
to gfoust/hotdrink
that referenced
this issue
Jul 11, 2012
Rename "lens" to "scratch". Other suggestions include "tunnel", "gate", "prism", "source", etc. but below discussion will use "scratch".
No error on target variable. Binders can distinguish variables and scratches. A binder (e.g. the number binder) creates a scratch as convenience only when needed. The programmer can bind to an error only if they explicitly created the scratch for it.
No declarative validation, e.g.,
toModel
,toView
,validate
in adata-bind
attribute. The programmer must create a scratch to add custom validation. We will reserve the option to allow, in the future, declarative addition of custom validation.Validating binders prepend their validation when binding to an existing scratch. It is an (undiagnosed) error to duplicate a binder's validation when creating a scratch for the binder. For example,
Validator conveniences should be extensible. Programmers should be able to extend new scratch proxies with custom validators.
.outgoing
should be variadic. When called with multiple validators, they should all be appended.The text was updated successfully, but these errors were encountered: