NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
Packagist
Packagist, #1697 most downloaded on Packagist
π Nette Forms: secure forms with one set of validation rules for server and browser, CSRF protection, and rendering done automatically or by hand in Latte.
Latest stable
v3.3.1
Last release 24 days ago
29 Oct 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
70 releases Β· first in 2014
Drag across the ruler to compare, or tap a release to open it.
New Form::Enum rule checks that a value is a case of a backed enum, so invalid input is caught by validation, in the browser too, before it reaches yo
->addRule($form::Enum, arg: Status::class)function (array $values, Form $form) works in onSuccess, onError, onClick and onValidate (#345)Control implementation, so custom controls no longer need to extend BaseControl to use them (#346)addRule() and addCondition(), and extension methods that take arguments (#350, #354)onSuccess can again be fired by calling them as methods (#356)$form points back to the enclosing form after a nested {form} closesStringable object (#349, #312)?foo) renders correctly (#348)post_max_size reports its own message, and the Numeric rule has a default messageYour coding agent can read these notes before it upgrades. Set up the MCP server β
->addRule($form::Enum, arg: Status::class)function (array $values, Form $form) works in onSuccess, onError, onClick and onValidate (#345)Control implementation, so custom controls no longer need to extend BaseControl to use them (#346)addRule() and addCondition(), and extension methods that take arguments (#350, #354){input} and {label} arguments β write {input name, class: 'big'} instead of {input name class: 'big'}, just as {form} expects since 3.3.0. This script adds the missing commas to your templates.onSuccess can again be fired by calling them as methods (#356)$form points back to the enclosing form after a nested {form} closesStringable object (#349, #312)?foo) renders correctly (#348)post_max_size reports its own message, and the Numeric rule has a default messageβ¦, and a round of housekeeping clears out long-deprecated APIs. Please test and report anything that breaks for you.
The headline of 3.3 is CSRF protection that the browser handles for you β no token, no cookie, no server-side state, and it holds even against XSS. On top of that, the confusing {formContext} / {formContainer} pair collapses into a single {form scope}, you can finally nest forms with {form detached}, and a round of housekeeping clears out long-deprecated APIs. Please test and report anything that breaks for you.
Sec-Fetch-Site header instead of the old SameSite cookie. The previous mechanism trusted submissions from any subdomain of the same site; the new one demands an exact origin match (scheme + host + port).setValues() / setDefaults() now expect iterable|stdClass.RadioList / CheckboxList: getControlPart() and getLabelPart() throw on an invalid item key instead of silently returning a nonsensical result.DataClassGenerator, LatteRenderer, getValues(true) (use getValues('array')), and the $default parameter of getOption() (use the ?? operator), negative validation rules{form scope name} β one tag to replace the easily-confused {formContext} and {formContainer}. It pushes the form onto the stack without emitting <form>, resolving the name relatively to an active form when there is one, otherwise from the top level.{form detached name} β nest forms at last. HTML forbids nested <form> tags, so detached emits an empty <form></form> up front and links every control back to it via the HTML5 form="..." attribute, no matter where they sit in the DOM.addSubmit() accepts an $onSubmit callback β attach a click handler right when you create the button, without a separate ->onClick[] =.{form} arguments β write {form name, attr=val} instead of {form name attr=val}, freeing keywords like scope/detached next to the name.Nothing published for this version
%value in error messages now reads naturally for every control: uploaded file names, the items of a multi-choice selection joined by commas, and dates
Control implementation, so custom controls no longer need to extend BaseControl to use them (#346)Stringable object; validation messages, select optgroups and the prompt now accept it (#349, #312)?foo) renders correctly (#348)post_max_size reports its own message instead of the one for file sizeForm or Container subclass that applies the SmartObject trait again works without a fatal error (nette/utils#338)A maintenance-focused release that tightens type safety across the whole codebase, modernizes the JavaScript test stack, and turns static analysis int
A maintenance-focused release that tightens type safety across the whole codebase, modernizes the JavaScript test stack, and turns static analysis into a non-negotiable part of the build. No API changes β just a more solid foundation under the hood.
Container, BaseControl, Validator, Rules, Form and friends, so PHPStan (and your IDE) see the real shape of thingsallowCrossOrigin() for clarityCheckboxList, RadioList::getControl() return empty element when has no items
RadioList::getControl() return empty element when has no itemsoptimized global function calls
SelectBox: correctly selects prompt #343
Container::addEmail() : added $maxLength=255 #303
Container::addEmail(): added $maxLength=255 #303getValue() instead of loadHttpData()__call() nette/utils#315Container::getValue() supports conversion to enums [Close #337 ]
Container::getValue() supports conversion to enums [Close #337]setNullable()Helpers::getSupportedTypes() returns array #332netteForms: reimplemented compact transmission mode via formdata event
isNullable()SelectBox: prompt is hidden/disabled when is required
<option> is hidden/disabled when is requiredHidden on Windows:
Disabled on Apple:
netteForms: converts float & int to numbers #313
SubmitButton::setValidationScope() accepts stringsContainer::getUntrustedValues() has default valueBaseControl, ControlGroup::getOption() parameter $default is deprecated
added Blueprint, replaces LatteRenderer, DataClassGenerator, {formPrint}, {formClassPrint}
<label> for CheckboxList/RadioList itemsadded addDate(), addTime() & addDateTime(), addColor()
addDate(), addTime() & addDateTime(), addColor()getCacheKey() to force refresh cacheContainer::getValues() respects validation scope #287
addFloat()Container::getValues() respects validation scope #287<dialog> by defaultDefaultFormRenderer: new methods for rendering elements
FormNNameNode: $form is created before tag itself #291
getUnsafeValues() renamed to getUntrustedValues()BaseControl, ControlGroup::getOption() parameter $default is silently deprecated
Form::initialize() sets 'secure' flag nette/http#217ControlGroup::getOption() parameter $default is silently deprecatedForm::addProtection() fixed error "Argument 3 must be of the type string or null, int given"
Form::addProtection() fixed error "Argument 3 must be of the type string or null, int given"compatibility: fixed interfaces
{formPrint} calls fireRenderEvents()
fireRenderEvents()addFilter()getValue() #277Form: checks the existence of handlers
<button> #273Form::addGroup() loose type (#269)<dialog> in Opera & mobile Chromium because it loses focus after alert() #275showModal() methodForm::getValues() fixed when in validation scope is container
Form::getValues() fixed when in validation scope is containeradded Container::getUnsafeValues(), onValidate does not throw warning [Closes #266]
phpDoc: fixed event type hints [Closes #265]
FormMacros: removed deprecated $_form
netteForms: added parameter 'event' to toggle()
toggle()toggle() even during initialization (possible BC break)hasOwnProperty() checkvalidateControl() #252For the details you can have a look at the diff.
{formPrint} more compact output
For the details you can have a look at the diff.
CheckboxList: compact transmission mode in form name=val1,val2,val3
validateNumeric() accepts unsigned integer #246getIterator() moves BLANK before FILLED #233getToggleStates() synced with netteForms.js toggleControltoggleControl(), synced with validateControl()validate() $emptyOptional is always false in BLANK conditionFor the details you can have a look at the diff.
FormMacros: added {formPrint $form}
setOptionAttribute()validateInteger() returns false when integer is too bigdata-nette-rules #243getLabel() removed return type void #241For the details you can have a look at the diff.
HiddenField: added setNullable() and addFilter() #171
setNullable() and addFilter() #171addRule() checks upload_max_filesize limitremoveRule()setHtmlAttribute()formatMessage() label is translated using form translator (#237)For the details you can have a look at the diff.
Validator::formatMessage() Fixed using label placeholder in validation rule with Html label
formatMessage() Fixed using label placeholder in validation rule with Html label (#235)__toString() is allowed since PHP 7.4For the details you can have a look at the diff.
BaseControl::getLabel() IHtmlString are not translated
getLabel() IHtmlString are not translated (#225)translate() ignores IHtmlStringFor the details you can have a look at the diff.
Container::addUpload() parameter $multiple is deprecated
?array; replace FALSE with [] (BC break)Nothing published for this version
compatibility with nette/latte v3
__toString() is allowed since PHP 7.4validatePattern() for UploadControl multiple (#192)For the details you can have a look at the diff.
BaseControl: added ability to multiple forms with different HTML ID #188
For the details you can have a look at the diff.
netteForms: DOMContentLoaded is never executed when script is loaded asynchronically
For the details you can have a look at the diff.
ChoiceControl, MultiChoiceControl: added checkDefaultValue() as replacement for $checkAllowedValues
checkDefaultValue() as replacement for $checkAllowedValues (#151)validatePattern() for FileUpload uses file name (#175)For the details you can have a look at the diff.
addError() by default translates messages (BC break)
addError() by default translates messages (BC break)reset()For the details you can have a look at the diff.
coding style: fixes, lowercase true/false/null
renderErrors() from renderPair() which was caused by #145 (->form = NULL) (#150)remove() and removeOrphans() #155For the details you can have a look at the diff.
added support for static addCondition(TRUE | FALSE)
validate()" - getValue() can be called before validationFor the details you can have a look at the diff.
BaseControl::setAttribute() and setType() aliased to setHtmlAttribute() and setHtmlType()
setAttribute() and setType() aliased to setHtmlAttribute() and setHtmlType()getLabelPart() uses $itemLabel instead of $labelFor the details you can have a look at the diff.
netteForms.js: cannot use range() to validate min/max
range() to validate min/max (#136)validateForm() #133validate() processes all conditionsFor the details you can have a look at the diff.
netteForms: forms are initialized on DOMContentLoaded instead of onload
addInteger() is nullablesetNullable()validate()getRenderedValue()addRule() instead of getControl() (is consistent with TextBase)For the details you can have a look at the diff.
negative rules like ~$form::ABCD are deprecated. (Negatives for FILLED & EQUAL are BLANK & NOT_EQUAL)
setRequired(TRUE | FALSE)addEmail() & addInteger()isMethod(), beforeRender() & fireRenderEvents() and event $onRenderaddOptionAttributes()isOk()isFilled() returns TRUE (BC break)isOK()<div> to noneForm::addProtection() is always the first itemenableAutoOptionalMode()netteForms.js:
showFormErrors() #65Latte:
{label} is AUTO_EMPTY<tag n:name> always uses getControlPart() and getLabelPart(), removed method_exists checking (BC break)For the details you can have a look at the diff.
BaseControl::setAttribute() and setType() aliased to setHtmlAttribute() and setHtmlType()
setAttribute() and setType() aliased to setHtmlAttribute() and setHtmlType()For the details you can have a look at the diff.
netteForms.js: cannot use range() to validate min/max
range() to validate min/max (#136)For the details you can have a look at the diff.
BaseControl::setValue() marked as @internal #114
BaseControl::setValue() marked as @internal #114validate() only for IControl & Container #86add() to Html:addHtml() to follow nette/utils#111 (#120)For the details you can have a look at the diff.
Helpers::exportRules() skips empty branches
isOK()exportRules() skips empty branchesFor the details you can have a look at the diff.
SelectBox: is not required when size > 1
For the details you can have a look at the diff.
Helpers::exportRules() correctly exports empty arrays #102
exportRules() correctly exports empty arrays #102For the details you can have a look at the diff.
FormMacros: added warnings Modifiers are not allowed here
For the details you can have a look at the diff.
Nothing published for this version
Helpers::createSelectBox: added parameter $selected
For the details you can have a look at the diff.
FormMacros: added support for Checkbox label with caption rendering
<label n:name /> Checkbox label with caption rendering<label n:name>For the details you can have a look at the diff.
netteForms.js: toggleControl() binds events on all inputs #75
<label n:name></label> is rendered without caption, fixes 6d16631For the details you can have a look at the diff.
netteForms.js: used form.elements.namedItem(β¦) instead of form.elements[β¦] #72
<button><label n:name /> displays caption, as {label /}For the details you can have a look at the diff.
One column per quarter.