Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
Merge 6212a95 into 051dfcc
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahsmall committed Jun 10, 2016
2 parents 051dfcc + 6212a95 commit f62b844
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions doc/src/built-in-helpers.md
Expand Up @@ -34,10 +34,10 @@ Renders a `<select>` element. The `Select` helper takes an extra second argument
array of options. Each options element can either be a `string => string` or it can be a `string => array`.

- `string => string`
- A normal `<option>`, with the array key being the value and the array value being the label
- A normal `<option>`, with the array key being the value and the array value being the label
- `string => array`
- An `<optgroup>`, with the array key being the label and the array value being the child options
- Option groups can also be nested.
- An `<optgroup>`, with the array key being the label and the array value being the child options
- Option groups can also be nested.

# Error Helpers

Expand Down
18 changes: 9 additions & 9 deletions doc/src/mappings.md
Expand Up @@ -87,36 +87,36 @@ field mappings with them. The `FieldMappingFactory` has the following methods wh
mappings:

- `text($minLength = 0, $maxLength = null, $encoding = 'utf-8')`
- Creates a simple string-to-string mapping, optionally applying constraints for the length of the string.
- Creates a simple string-to-string mapping, optionally applying constraints for the length of the string.

- `emailAddress()`
- Creates a mapping which requires the input string to be a valid email address.
- Creates a mapping which requires the input string to be a valid email address.

- `integer()`
- Creates a mapping between input strings and PHP integers, validating that the input string is actually a valid
- Creates a mapping between input strings and PHP integers, validating that the input string is actually a valid
integer string.

- `float()`
- Creates a mapping between input strings and PHP floats, validating that the input string is actually a valid float
- Creates a mapping between input strings and PHP floats, validating that the input string is actually a valid float
string.

- `decimal()`
- Similar to `float()`, but keeps the the number as a string after validation.
- Similar to `float()`, but keeps the the number as a string after validation.

- `boolean()`
- Creates a mapping between input strings and PHP booleans. The input string must either be `"true"`, `"false"` or be
- Creates a mapping between input strings and PHP booleans. The input string must either be `"true"`, `"false"` or be
absent. This latter special requirement is because unchecked checkboxes are not transferred at all.

- `time(DateTimeZone $timeZone = null)`
- Creates a mapping for `<input type="time">` to `ImmutableDateTime`. By default, times are treated as UTC, but you
- Creates a mapping for `<input type="time">` to `ImmutableDateTime`. By default, times are treated as UTC, but you
can also pass a custom time zone to the factory.

- `date(DateTimeZone $timeZone = null)`
- Creates a mapping for `<input type="date">` to `ImmutableDateTime`. By default, times are treated as UTC, but you
- Creates a mapping for `<input type="date">` to `ImmutableDateTime`. By default, times are treated as UTC, but you
can also pass a custom time zone to the factory.

- `dateTime(DateTimeZone $timeZone = null, $localTime = false)`
- Creates a mapping for `<input type="datetime">` and `<input type="datetime-local">` to `ImmutableDateTime`. By
- Creates a mapping for `<input type="datetime">` and `<input type="datetime-local">` to `ImmutableDateTime`. By
default, times are treated as UTC, but you can also pass a custom time zone to the factory. When using type
`datetime`, you don't have to set the `$localTime` parameter. When using the `datetime-local` type, the browser will
not submit a time zone, so it is important to pass a time zone to the factory in which the datetime should be
Expand Down

0 comments on commit f62b844

Please sign in to comment.