Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms: add notes about Form::PATTERN_ICASE #719

Merged
merged 1 commit into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cs/form-fields.texy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Přidá jednořádkové textové políčko (třída [TextInput |api:Nette\Forms\
| `Form::EMAIL` | je hodnota platná e-mailová adresa?
| `Form::URL` | je hodnota absolutní URL?
| `Form::PATTERN` | testuje oproti regulárnímu výrazu celou hodnotu, tj. jako by byl obalen znaky ^ a $ | `string $pattern`
| `Form::PATTERN_ICASE` | jako `Form::PATTERN`, ale case-insensitive (nezávislé na velikosti písmen); podporováno od nette/forms v2.4.9 | `string $pattern`
| `Form::INTEGER` | je hodnota celočíselná?
| `Form::NUMERIC` | alias pro `Form::INTEGER`
| `Form::FLOAT` | je hodnota číslo?
Expand Down Expand Up @@ -86,6 +87,8 @@ Přidá políčko pro upload souboru (třída [UploadControl |api:Nette\Forms\Co
| `Form::MAX_FILE_SIZE` | ověřuje maximální velikost souboru | `int $bytes`
| `Form::MIME_TYPE` | ověření MIME type | `string $mimeType` nebo `$mimeTypes[]`. Může obsahovat zástupné znaky, např. `video/*`
| `Form::IMAGE` | ověření, že jde o obrázek JPEG, PNG nebo GIF
| `Form::PATTERN` | testuje jméno souboru oproti regulárnímu výrazu; podporováno na straně serveru od nette/forms v2.4.7, na straně klienta od nette/forms v2.4.9 | `string $pattern`
| `Form::PATTERN_ICASE` | jako `Form::PATTERN`, ale case-insensitive (nezávislé na velikosti písmen); podporováno od nette/forms v2.4.9 | `string $pattern`

/--php
$form->addUpload('avatar', 'Avatar:')
Expand Down
5 changes: 4 additions & 1 deletion en/form-fields.texy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Adds single line text field (class [TextInput |api:Nette\Forms\Controls\TextInpu
| `Form::LENGTH` | exact length | `[int $min, int $max]` or `int $length`
| `Form::EMAIL` | is value a valid email address?
| `Form::URL` | is value a valid URL?
| `Form::PATTERN` | tests against regular expression entire value, somewhat as if it is inside ^ and a $ | `string $pattern`
| `Form::PATTERN` | tests the entire value against a regular expression, kind of like it is inside ^ and a $ | `string $pattern`
| `Form::PATTERN_ICASE` | like `Form::PATTERN`, but case-insensitive; since nette/forms v2.4.9 | `string $pattern`
| `Form::INTEGER` | is value integer?
| `Form::NUMERIC` | alias of `Form::INTEGER`
| `Form::FLOAT` | is value a floating point number?
Expand Down Expand Up @@ -86,6 +87,8 @@ Adds file upload field (class [UploadControl |api:Nette\Forms\Controls\UploadCon
| `Form::MAX_FILE_SIZE` | verifies maximal file size | `int $bytes`
| `Form::MIME_TYPE` | checks if MIME type is valid | `string $mimeType` or `$mimeTypes[]`. Can contain wildcards, such as `video/*`.
| `Form::IMAGE` | checks if uploaded file is JPEG, PNG or GIF
| `Form::PATTERN` | tests the file name against a regular expression; server-side support since nette/forms v2.4.7, client-side support since nette/forms v2.4.9 | `string $pattern`
| `Form::PATTERN_ICASE` | like `Form::PATTERN`, but case-insensitive; since nette/forms v2.4.9 | `string $pattern`

/--php
$form->addUpload('thumbnail', 'Thumbnail:')
Expand Down