Skip to content

Commit

Permalink
[reference/constraints/]区切り線修正
Browse files Browse the repository at this point in the history
[reference/constraints/]MaxLength.rst翻訳
[reference/constraints/]MinLength.rst翻訳
  • Loading branch information
yanchi committed Jul 24, 2011
1 parent a41d1dc commit a5038ca
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 19 deletions.
2 changes: 1 addition & 1 deletion reference/constraints/Date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Date
- Date: ~
オプション
-------
----------

* ``message``: 検証に失敗した場合のエラーメッセージ
2 changes: 1 addition & 1 deletion reference/constraints/DateTime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ DateTime
- DateTime: ~
オプション
-------
----------

* ``message``: 検証に失敗した場合のエラーメッセージ
2 changes: 1 addition & 1 deletion reference/constraints/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Email
- Email: ~
オプション
-------
----------

* ``checkMX``: ドメインに対してMXレコードをチェックするべきかどうか。 デフォルト: ``false``
* ``message``: 検証に失敗した場合のエラーメッセージ
2 changes: 1 addition & 1 deletion reference/constraints/False.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ False
- False: ~
オプション
-------
----------

* ``message``: 検証に失敗した場合のエラーメッセージ

Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Max.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. 2011/07/23 yanchi36a165e88363fd6e5b5eb0ae712303dd362545be
.. 2011/07/23 yanchi 36a165e88363fd6e5b5eb0ae712303dd362545be
Max
===
Expand All @@ -12,7 +12,7 @@ Max
- Max: 99
オプション
-------
----------

* ``limit`` (**デフォルト**, 必須): 制限値
* ``message``: 検証に失敗した場合のエラーメッセージ
68 changes: 64 additions & 4 deletions reference/constraints/MaxLength.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
このページの翻訳はまだ行われていません。
========================================
.. 2011/07/23 yanchi 57b7d4750ae7e2a2382ac0ad44fa82d4bfc7765e
翻訳にご協力くださる方は
`github/symfony-japan <https://github.com/symfony-japan/symfony-docs-ja/wiki>`_ まで!
MaxLength
=========

値の文字列の長さが、与えられた制限値以下であることを検証します。

+-----------------------+----------------------------------------------------------------+
| 検証 | 文字列 |
+-----------------------+----------------------------------------------------------------+
| オプション | - ``limit`` |
| | - ``message`` |
| | - ``charset`` |
+-----------------------+----------------------------------------------------------------+
| デフォルト オプション | ``limit`` |
+-----------------------+----------------------------------------------------------------+
| クラス | :class:`Symfony\\Component\\Validator\\Constraints\\MaxLength` |
+-----------------------+----------------------------------------------------------------+

オプション
----------

* ``limit`` (**デフォルト**, 必須) [タイプ: 整数値]
これは文字列の最大長です。 もし10に設定された場合、文字列は長さが
10文字以内でなければなりません。

* ``message`` [タイプ: 文字列, デフォルト: ``This value is too long. It should have {{ limit }} characters or less``]
検証に失敗した場合のエラーメッセージ

基本的な使い方
--------------

.. configuration-block::

.. code-block:: yaml
# src/Acme/HelloBundle/Resources/config/validation.yml
Acme\HelloBundle\Blog:
properties:
summary:
- MaxLength: 100
.. code-block:: xml
<!-- src/Acme/HelloBundle/Resources/config/validation.xml -->
<class name="Acme\HelloBundle\Blog">
<property name="summary">
<constraint name="MaxLength">
<value>100</value>
</constraint>
</property>
</class>
.. code-block:: php-annotations
// src/Acme/HelloBundle/Blog.php
use Symfony\Component\Validator\Constraints as Assert;
class Blog
{
/**
* @Assert\MaxLength(100)
*/
protected $summary;
}
2 changes: 1 addition & 1 deletion reference/constraints/Min.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Min
- Min: 1
オプション
-------
----------

* ``limit`` (**デフォルト**, 必須): 制限値
* ``message``: 検証に失敗した場合のエラーメッセージ
68 changes: 64 additions & 4 deletions reference/constraints/MinLength.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
このページの翻訳はまだ行われていません。
========================================
.. 2011/07/24 yanchi 57b7d4750ae7e2a2382ac0ad44fa82d4bfc7765e
翻訳にご協力くださる方は
`github/symfony-japan <https://github.com/symfony-japan/symfony-docs-ja/wiki>`_ まで!
MinLength
=========

値の文字列の長さが、与えられた制限値以上であることを検証します。

+-----------------------+----------------------------------------------------------------+
| 検証 | 文字列 |
+-----------------------+----------------------------------------------------------------+
| オプション | - ``limit`` |
| | - ``message`` |
| | - ``charset`` |
+-----------------------+----------------------------------------------------------------+
| デフォルト オプション | ``limit`` |
+-----------------------+----------------------------------------------------------------+
| クラス | :class:`Symfony\\Component\\Validator\\Constraints\\MinLength` |
+-----------------------+----------------------------------------------------------------+

オプション
----------

* ``limit`` (**デフォルト**, 必須) [タイプ: 整数値]
これは文字列の最小長です。 もし3に設定された場合、文字列は長さが
3文字以上でなければなりません。

* ``message`` [タイプ: 文字列, デフォルト: ``This value is too short. It should have {{ limit }} characters or more``]
検証に失敗した場合のエラーメッセージ

基本的な使い方
--------------

.. configuration-block::

.. code-block:: yaml
# src/Acme/HelloBundle/Resources/config/validation.yml
Acme\HelloBundle\Author:
properties:
firstName:
- MinLength: 3
.. code-block:: xml
<!-- src/Acme/HelloBundle/Resources/config/validation.xml -->
<class name="Acme\HelloBundle\Author">
<property name="firstName">
<constraint name="MinLength">
<value>3</value>
</constraint>
</property>
</class>
.. code-block:: php-annotations
// src/Acme/HelloBundle/Author.php
use Symfony\Component\Validator\Constraints as Assert;
class Author
{
/**
* @Assert\MinLength(3)
*/
protected $firstName;
}
2 changes: 1 addition & 1 deletion reference/constraints/NotBlank.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NotBlank
========

値が空ではないことを検証します。(`empty <http://php.net/empty>`_construct によって決定します)。
値が空ではないことを検証します。(`empty <http://php.net/empty>`_ construct によって決定します)。

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/NotNull.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ NotNull
- NotNull: ~
オプション
-------
----------

* ``message``: 検証に失敗した場合のエラーメッセージ
2 changes: 1 addition & 1 deletion reference/constraints/Regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Regex
- Regex: /\w+/
オプション
-------
----------

* ``pattern`` (**デフォルト**, 必須): 正規表現パータン
* ``match``: パターンがマッチしなければならないまたは、マッチしてはならないかどちらか。
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Url.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Url
- Url: ~
オプション
-------
----------

* ``protocols``: 許可されているプロトコルのリスト。 デフォルト: "http", "https", "ftp", "ftps".
* ``message``: 検証に失敗した場合のエラーメッセージ

0 comments on commit a5038ca

Please sign in to comment.