Advertisement
Guest User

validation

a guest
May 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.26 KB | None | 0 0
  1. <?php
  2.  
  3. return [
  4.  
  5.     /*
  6.     |--------------------------------------------------------------------------
  7.     | Validation Language Lines
  8.     |--------------------------------------------------------------------------
  9.     |
  10.     | The following language lines contain the default error messages used by
  11.     | the validator class. Some of these rules have multiple versions such
  12.     | as the size rules. Feel free to tweak each of these messages here.
  13.     |
  14.     */
  15.  
  16.     'accepted'             => 'The :attribute must be accepted.',
  17.     'active_url'           => 'The :attribute is not a valid URL.',
  18.     'after'                => 'The :attribute must be a date after :date.',
  19.     'after_or_equal'       => 'The :attribute must be a date after or equal to :date.',
  20.     'alpha'                => 'The :attribute may only contain letters.',
  21.     'alpha_dash'           => 'The :attribute may only contain letters, numbers, and dashes.',
  22.     'alpha_num'            => 'The :attribute may only contain letters and numbers.',
  23.     'array'                => 'The :attribute must be an array.',
  24.     'before'               => 'The :attribute must be a date before :date.',
  25.     'before_or_equal'      => 'The :attribute must be a date before or equal to :date.',
  26.     'between'              => [
  27.         'numeric' => 'The :attribute must be between :min and :max.',
  28.         'file'    => 'The :attribute must be between :min and :max kilobytes.',
  29.         'string'  => 'The :attribute must be between :min and :max characters.',
  30.         'array'   => 'The :attribute must have between :min and :max items.',
  31.     ],
  32.     'boolean'              => 'The :attribute field must be true or false.',
  33.     'confirmed'            => 'The :attribute confirmation does not match.',
  34.     'date'                 => 'The :attribute is not a valid date.',
  35.     'date_format'          => 'The :attribute does not match the format :format.',
  36.     'different'            => 'The :attribute and :other must be different.',
  37.     'digits'               => 'The :attribute must be :digits digits.',
  38.     'digits_between'       => 'The :attribute must be between :min and :max digits.',
  39.     'dimensions'           => 'The :attribute has invalid image dimensions.',
  40.     'distinct'             => 'The :attribute field has a duplicate value.',
  41.     'email'                => 'The :attribute must be a valid email address.',
  42.     'exists'               => 'The selected :attribute is invalid.',
  43.     'file'                 => 'The :attribute must be a file.',
  44.     'filled'               => 'The :attribute field must have a value.',
  45.     'image'                => 'The :attribute must be an image.',
  46.     'in'                   => 'The selected :attribute is invalid.',
  47.     'in_array'             => 'The :attribute field does not exist in :other.',
  48.     'integer'              => 'The :attribute must be an integer.',
  49.     'ip'                   => 'The :attribute must be a valid IP address.',
  50.     'json'                 => 'The :attribute must be a valid JSON string.',
  51.     'max'                  => [
  52.         'numeric' => 'The :attribute may not be greater than :max.',
  53.         'file'    => 'The :attribute may not be greater than :max kilobytes.',
  54.         'string'  => 'The :attribute may not be greater than :max characters.',
  55.         'array'   => 'The :attribute may not have more than :max items.',
  56.     ],
  57.     'mimes'                => 'The :attribute must be a file of type: :values.',
  58.     'mimetypes'            => 'The :attribute must be a file of type: :values.',
  59.     'min'                  => [
  60.         'numeric' => 'The :attribute must be at least :min.',
  61.         'file'    => 'The :attribute must be at least :min kilobytes.',
  62.         'string'  => 'The :attribute must be at least :min characters.',
  63.         'array'   => 'The :attribute must have at least :min items.',
  64.     ],
  65.     'not_in'               => 'Kolom yang di pilih :attribute tidak benar.',
  66.     'numeric'              => 'Kolom :attribute harus berisi number/nomor.',
  67.     'present'              => 'Kolom :attribute harus di isi.',
  68.     'regex'                => 'Kolom :attribute format tidak benar.',
  69.     'required'             => 'Kolom :attribute harus di isi.',
  70.     'required_if'          => 'The :attribute field is required when :other is :value.',
  71.     'required_unless'      => 'The :attribute field is required unless :other is in :values.',
  72.     'required_with'        => 'The :attribute field is required when :values is present.',
  73.     'required_with_all'    => 'The :attribute field is required when :values is present.',
  74.     'required_without'     => 'The :attribute field is required when :values is not present.',
  75.     'required_without_all' => 'The :attribute field is required when none of :values are present.',
  76.     'same'                 => 'The :attribute and :other must match.',
  77.     'size'                 => [
  78.         'numeric' => 'The :attribute must be :size.',
  79.         'file'    => 'The :attribute must be :size kilobytes.',
  80.         'string'  => 'The :attribute must be :size characters.',
  81.         'array'   => 'The :attribute must contain :size items.',
  82.     ],
  83.     'string'               => 'The :attribute must be a string.',
  84.     'timezone'             => 'The :attribute must be a valid zone.',
  85.     'unique'               => 'The :attribute has already been taken.',
  86.     'uploaded'             => 'The :attribute failed to upload.',
  87.     'url'                  => 'The :attribute format is invalid.',
  88.  
  89.     /*
  90.     |--------------------------------------------------------------------------
  91.     | Custom Validation Language Lines
  92.     |--------------------------------------------------------------------------
  93.     |
  94.     | Here you may specify custom validation messages for attributes using the
  95.     | convention "attribute.rule" to name the lines. This makes it quick to
  96.     | specify a specific custom language line for a given attribute rule.
  97.     |
  98.     */
  99.  
  100.     'custom' => [
  101.         'nip' => [
  102.             'required' => 'Kolom NIP harus di isi.',
  103.             'string' => 'Kolom NIP harus berupa string.',
  104.             'size' => 'Kolom NIP harus :size angka.',
  105.             'unique' => 'NIP sudah terpakai',
  106.         ],
  107.  
  108.         'nama' => [
  109.             'required' => 'Kolom Nama harus di isi.',
  110.             'string' => 'Kolom Nama harus berupa string.',
  111.             'max' => 'Kolom Nama tidak boleh lebih dari :max karakter.',
  112.         ],
  113.  
  114.         'tgl_lahir' => [
  115.             'required' => 'Kolom Tanggal lahir harus di isi.',
  116.             'date' => 'Kolom Tanggal lahir harus di isi format tanggal yang benar.',
  117.             'size' => 'Kolom NIP harus :size angka.',
  118.             'unique' => 'NIP sudah terpakai',
  119.         ],
  120.  
  121.         'gender' => [
  122.             'required' => 'Kolom gender harus di isi.',
  123.             'in' => 'Kolom gender harus di isi L atau P.',
  124.         ],
  125.  
  126.     ],
  127.  
  128.     /*
  129.     |--------------------------------------------------------------------------
  130.     | Custom Validation Attributes
  131.     |--------------------------------------------------------------------------
  132.     |
  133.     | The following language lines are used to swap attribute place-holders
  134.     | with something more reader friendly such as E-Mail Address instead
  135.     | of "email". This simply helps us make messages a little cleaner.
  136.     |
  137.     */
  138.  
  139.     'attributes' => [],
  140.  
  141. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement