diff --git a/.gitignore b/.gitignore index 496ee2ca..9da98cab 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,11 @@ -.DS_Store \ No newline at end of file +.DS_Store +.idea +nbproject +nb-configuration.xml +Session.vim +*.tmproj +*.tmproject +tmtags +Thumbs.db +Desktop.ini + diff --git a/.travis.yml b/.travis.yml index bccb225f..e1dbb246 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,5 @@ language: php php: - "7.0" - "5.6" - - "5.5" - - "5.4" - hhvm script: php tests.php diff --git a/gump.class.php b/gump.class.php index 81b05546..5a60509e 100644 --- a/gump.class.php +++ b/gump.class.php @@ -257,17 +257,20 @@ public function filter_rules(array $rules = array()) * * @param array $data * @param bool $check_fields + * @param string $rules_delimiter + * @param string $parameters_delimiters * * @return array * * @throws Exception */ - public function run(array $data, $check_fields = false) + public function run(array $data, $check_fields = false, $rules_delimiter='|', $parameters_delimiters=',') { - $data = $this->filter($data, $this->filter_rules()); + $data = $this->filter($data, $this->filter_rules(), $rules_delimiter, $parameters_delimiters); $validated = $this->validate( - $data, $this->validation_rules() + $data, $this->validation_rules(), + $rules_delimiter, $parameters_delimiters ); if ($check_fields === true) { @@ -368,21 +371,24 @@ public function errors() /** * Perform data validation against the provided ruleset. + * If any rule's parameter contains either '|' or ',', the corresponding default separator can be changed * * @param mixed $input * @param array $ruleset + * @param string $rules_delimiter + * @param string $parameters_delimiter * * @return mixed * * @throws Exception */ - public function validate(array $input, array $ruleset) + public function validate(array $input, array $ruleset, $rules_delimiter='|', $parameters_delimiter=',') { $this->errors = array(); foreach ($ruleset as $field => $rules) { - $rules = explode('|', $rules); + $rules = explode($rules_delimiter, $rules); $look_for = array('required_file', 'required'); @@ -407,8 +413,8 @@ public function validate(array $input, array $ruleset) $param = null; // Check if we have rule parameters - if (strstr($rule, ',') !== false) { - $rule = explode(',', $rule); + if (strstr($rule, $parameters_delimiter) !== false) { + $rule = explode($parameters_delimiter, $rule); $method = 'validate_'.$rule[0]; $param = $rule[1]; $rule = $rule[0]; @@ -651,9 +657,12 @@ public function get_errors_array($convert_to_string = null) /** * Filter the input data according to the specified filter set. + * If any filter's parameter contains either '|' or ',', the corresponding default separator can be changed * * @param mixed $input * @param array $filterset + * @param string $filters_delimeter + * @param string $parameters_delimiter * * @throws Exception * @@ -661,20 +670,20 @@ public function get_errors_array($convert_to_string = null) * * @throws Exception */ - public function filter(array $input, array $filterset) + public function filter(array $input, array $filterset, $filters_delimeter='|', $parameters_delimiter=',') { foreach ($filterset as $field => $filters) { if (!array_key_exists($field, $input)) { continue; } - $filters = explode('|', $filters); + $filters = explode($filters_delimeter, $filters); foreach ($filters as $filter) { $params = null; - if (strstr($filter, ',') !== false) { - $filter = explode(',', $filter); + if (strstr($filter, $parameters_delimiter) !== false) { + $filter = explode($parameters_delimiter, $filter); $params = array_slice($filter, 1, count($filter) - 1); @@ -942,7 +951,7 @@ protected function filter_upper_case($value, $params = null) protected function filter_slug($value, $params = null) { $delimiter = '-'; - $slug = strtolower(trim(preg_replace('/[\s-]+/', $delimiter, preg_replace('/[^A-Za-z0-9-]+/', $delimiter, preg_replace('/[&]/', 'and', preg_replace('/[\']/', '', iconv('UTF-8', 'ASCII//TRANSLIT', $str))))), $delimiter)); + $slug = strtolower(trim(preg_replace('/[\s-]+/', $delimiter, preg_replace('/[^A-Za-z0-9-]+/', $delimiter, preg_replace('/[&]/', 'and', preg_replace('/[\']/', '', iconv('UTF-8', 'ASCII//TRANSLIT', $value))))), $delimiter)); return $slug; } @@ -1513,7 +1522,7 @@ protected function validate_url_exists($field, $input, $param = null) $url = $url['host']; } - if (function_exists('checkdnsrr')) { + if (function_exists('checkdnsrr') && function_exists('idn_to_ascii')) { if (checkdnsrr(idn_to_ascii($url), 'A') === false) { return array( 'field' => $field, @@ -1646,6 +1655,23 @@ protected function validate_valid_cc($field, $input, $param = null) $number_length = strlen($number); } + + /** + * Bail out if $number_length is 0. + * This can be the case if a user has entered only alphabets + * + * @since 1.5 + */ + if( $number_length == 0 ) { + return array( + 'field' => $field, + 'value' => $input[$field], + 'rule' => __FUNCTION__, + 'param' => $param, + ); + } + + $parity = $number_length % 2; $total = 0; @@ -1693,7 +1719,7 @@ protected function validate_valid_name($field, $input, $param = null) return; } - if (!preg_match("/^([a-zÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖßÙÚÛÜÝàáâãäåçèéêëìíîïñðòóôõöùúûüýÿ '-])+$/i", $input[$field]) !== false) { + if (!preg_match("/^([a-z \p{L} '-])+$/i", $input[$field]) !== false) { return array( 'field' => $field, 'value' => $input[$field], @@ -1999,7 +2025,7 @@ protected function validate_extension($field, $input, $param = null) $path_info = pathinfo($input[$field]['name']); $extension = isset($path_info['extension']) ? $path_info['extension'] : false; - if ($extension && in_array($extension, $allowed_extensions)) { + if ($extension && in_array(strtolower($extension), $allowed_extensions)) { return; } @@ -2011,6 +2037,42 @@ protected function validate_extension($field, $input, $param = null) ); } } + + /** + * Check the uploaded file for filesize + * checks only the ext should add mime type check. + * + * Usage: '' => 'file_size,500kb + * + * @param string $field + * @param array $input + * + * @return mixed + */ + protected function validate_file_size($field, $input, $param = null) + { + if (!isset($input[$field])) { + return; + } + + if (is_array($input[$field]) && $input[$field]['error'] !== 4) { + $max_filesize = str_replace('kb', '', trim(strtolower($param))) * 1024; + + //get the image filesize + $imagesize = $input[$field]['size']; + + if ( ($imagesize > 0) && ($imagesize < $max_filesize) ) { + return; + } + + return array( + 'field' => $field, + 'value' => $input[$field], + 'rule' => __FUNCTION__, + 'param' => $param, + ); + } + } /** * Determine if the provided field value equals current field value. @@ -2099,6 +2161,7 @@ private function trimScalar($value) * Examples: * * 555-555-5555: valid + * 555.555.5555: valid * 5555425555: valid * 555 555 5555: valid * 1(519) 555-4444: valid @@ -2112,7 +2175,7 @@ protected function validate_phone_number($field, $input, $param = null) return; } - $regex = '/^(\d[\s-]?)?[\(\[\s-]{0,2}?\d{3}[\)\]\s-]{0,2}?\d{3}[\s-]?\d{4}$/i'; + $regex = '/^(\d[\s-\.]?)?[\(\[\s-\.]{0,2}?\d{3}[\)\]\s-\.]{0,2}?\d{3}[\s-\.]?\d{4}$/i'; if (!preg_match($regex, $input[$field])) { return array( 'field' => $field, @@ -2387,4 +2450,31 @@ protected function validate_valid_pashtu_text($field, $input, $param = null) } } + /** + * Determine if the provided value is a valid twitter handle. + * + * @access protected + * @param string $field + * @param array $input + * @return mixed + */ + protected function validate_valid_twitter($field, $input, $param = NULL) + { + if(!isset($input[$field]) || empty($input[$field])) + { + return; + } + $json_twitter = file_get_contents("http://twitter.com/users/username_available?username=".$input[$field]); + + $twitter_response = json_decode($json_twitter); + if($twitter_response->reason != "taken"){ + return array( + 'field' => $field, + 'value' => $input[$field], + 'rule' => __FUNCTION__, + 'param' => $param + ); + } + } + } diff --git a/lang/de.php b/lang/de.php new file mode 100644 index 00000000..f3bf8c38 --- /dev/null +++ b/lang/de.php @@ -0,0 +1,46 @@ + 'Das Feld "{field}" ist erforderlich.', + 'validate_valid_email' => 'Das Feld "{field}" muss eine gültige E-Mail-Adresse sein.', + 'validate_max_len' => 'Das Feld "{field}" darf maximal {param} Zeichen enthalten.', + 'validate_min_len' => 'Das Feld "{field}" muss mindestens {param} Zeichen enthalten.', + 'validate_exact_len' => 'Das Feld "{field}" muss genau {param} Zeichen enthalten.', + 'validate_alpha' => 'Das Feld "{field}" darf nur Buchstaben enthalten.', + 'validate_alpha_numeric' => 'Das Feld "{field}" darf nur Buchstaben und Ziffern enthalten.', + 'validate_alpha_numeric_space' => 'Das Feld "{field}" darf nur Buchstaben, Ziffern und Leerzeichen enthalten.', + 'validate_alpha_dash' => 'Das Feld "{field}" darf nur Buchstaben und Bindestriche enthalten.', + 'validate_alpha_space' => 'Das Feld "{field}" darf nur Buchstaben und Leerzeichen enthalten.', + 'validate_numeric' => 'Das Feld "{field}" muss eine Nummer sein.', + 'validate_integer' => 'Das Feld "{field}" muss eine Nummer ohne Nachkommastellen (ganze Zahl) sein.', + 'validate_boolean' => 'Das Feld "{field}" muss entweder wahr oder falsch sein.', + 'validate_float' => 'Das Feld "{field}" muss eine Nummer mit einem Dezimalpunkt (Gleitpunktzahl) sein.', + 'validate_valid_url' => 'Das Feld "{field}" muss eine URL sein.', + 'validate_url_exists' => 'Die im Feld "{field}" angegebene URL existiert nicht.', + 'validate_valid_ip' => 'Das Feld "{field}" muss eine gültige IP-Adresse sein.', + 'validate_valid_ipv4' => 'Das Feld "{field}" muss eine gültige IPv4-Adresse enthalten.', + 'validate_valid_ipv6' => 'Das Feld "{field}" muss eine gültige IPv6-Adresse enthalten.', + 'validate_guidv4' => 'Das Feld "{field}" muss eine gültige GUID enthalten.', + 'validate_valid_cc' => 'Das Feld "{field}" ist keine gültige Kreditkartennummer.', + 'validate_valid_name' => 'Das Feld "{field}" muss ein voller Name sein.', + 'validate_contains' => 'Das Feld "{field}" kann nur eines der folgenden sein: {param}', + 'validate_contains_list' => 'Das Feld "{field}" ist keine gültige Wahl.', + 'validate_doesnt_contain_list' => 'Das Feld "{field}" enthält einen nicht akzeptierten Wert.', + 'validate_street_address' => 'Das Feld "{field}" muss eine gültige Straßenangabe sein.', + 'validate_date' => 'Das Feld "{field}" muss ein gültiges Datum sein.', + 'validate_min_numeric' => 'Das Feld "{field}" muss ein numerischer Wert größergleich {param} sein.', + 'validate_max_numeric' => 'Das Feld "{field}" muss ein numerischer Wert kleinergleich {param} sein.', + 'validate_min_age' => 'Das Feld "{field}" muss ein Alter größergleich {param} haben.', + 'validate_invalid' => 'Das Feld "{field}" ist ungültig.', + 'validate_starts' => 'Das Feld "{field}" muss mit {param} beginnen.', + 'validate_extension' => 'Das Feld "{field}" kann nur eine der folgenden Erweiterungen haben: {param}', + 'validate_required_file' => 'Das Feld "{field}" ist erforderlich.', + 'validate_equalsfield' => 'Das Feld "{field}" ist nicht gleich dem Feld "{param}".', + 'validate_iban' => 'Das Feld "{field}" muss eine gültige IBAN enthalten.', + 'validate_phone_number' => 'Das Feld "{field}" muss eine gültige Telefonnummer sein.', + 'validate_regex' => 'Das Feld "{field}" muss einen Wert im gültigem Format enthalten.', + 'validate_valid_json_string' => 'Das Feld "{field}" muss eine gültige JSON-Format-Zeichenfolge enthalten.', + 'validate_valid_array_size_greater' => 'Das Feld "{field}" muss ein Array mit einer Größe größergleich {param} sein.', + 'validate_valid_array_size_lesser' => 'Das Feld "{field}" muss ein Array mit einer Größe kleinergleich {param} sein.', + 'validate_valid_array_size_equal' => 'Das Feld "{field}" muss ein Array mit einer Größe gleich {param} sein.', +); diff --git a/lang/en.php b/lang/en.php index 7d0cbc20..0911615b 100644 --- a/lang/en.php +++ b/lang/en.php @@ -34,6 +34,7 @@ 'validate_invalid' => 'The {field} field is invalid', 'validate_starts' => 'The {field} field needs to start with {param}', 'validate_extension' => 'The {field} field can only have one of the following extensions: {param}', + 'validate_file_size' => 'The {field} must be smaller than: {param}', 'validate_required_file' => 'The {field} field is required', 'validate_equalsfield' => 'The {field} field does not equal {param} field', 'validate_iban' => 'The {field} field needs to contain a valid IBAN', @@ -48,4 +49,5 @@ 'validate_valid_persian_digit' => 'The {field} should be a valid digit in Persian/Dari or Arabic format', 'validate_valid_persian_text' => 'The {field} should be a valid text in Persian/Dari or Arabic format', 'validate_valid_pashtu_text' => 'The {field} should be a valid text in Pashtu format', + 'validate_valid_twitter' => 'The {field} is not a valid twitter handle', ); diff --git a/lang/es.php b/lang/es.php index 38ec2ce9..17f1d2d0 100644 --- a/lang/es.php +++ b/lang/es.php @@ -3,15 +3,15 @@ return array( 'validate_required' => 'El campo {field} es requerido', 'validate_valid_email' => 'El campo {field} debe ser una dirección de correo electrónico válida', - 'validate_max_len' => 'El campo {field} no puede tener más de {param} carácteres de longitud', - 'validate_min_len' => 'El campo {field} debe tener al menos {param} carácteres de longitud', - 'validate_exact_len' => 'El campo {field} debe tener {param} carácteres de longitud', + 'validate_max_len' => 'El campo {field} no puede tener más de {param} caracteres de longitud', + 'validate_min_len' => 'El campo {field} debe tener al menos {param} caracteres de longitud', + 'validate_exact_len' => 'El campo {field} debe tener {param} caracteres de longitud', 'validate_alpha' => 'El campo {field} sólo puede contener letras', 'validate_alpha_numeric' => 'El campo {field} sólo puede contener letras y números', 'validate_alpha_numeric_space' => 'El campo {field} solo puede contener letras, números y espacios', 'validate_alpha_dash' => 'El campo {field} sólo puede contener letras y guiones', 'validate_alpha_space' => 'El campo {field} sólo puede contener letras y espacios', - 'validate_numeric' => 'El campo {field} sólo puede contener carácteres numéricos', + 'validate_numeric' => 'El campo {field} sólo puede contener caracteres numéricos', 'validate_integer' => 'El campo {field} sólo puede contener un valor numérico', 'validate_boolean' => 'El campo {field} debe ser verdadero o falso', 'validate_float' => 'El campo {field} sólo puede contener un valor flotante', diff --git a/lang/fr.php b/lang/fr.php index 0cfe1afe..a2806c69 100644 --- a/lang/fr.php +++ b/lang/fr.php @@ -29,14 +29,14 @@ 'validate_date' => 'Le champ {field} doit être une date valide', 'validate_min_numeric' => 'Le champ {field} doit être une valeur numérique égale ou supérieur à {param}', 'validate_max_numeric' => 'Le champ {field} doit être une valeur numérique égale ou inférieur à {param}', - 'validate_min_age' => 'Le champ {field} doit être un age égale ou supérieur à {param}', + 'validate_min_age' => 'Le champ {field} doit être un âge égal ou supérieur à {param}', 'validate_invalid' => 'Le champ {field} est invalide', 'validate_starts' => 'Le champ {field} doit commencer par {param}', 'validate_extension' => 'Le champ {field} doit avoir les extensions suivantes {param}', 'validate_required_file' => 'Le champ {field} est obligatoire', 'validate_equalsfield' => 'Le champ {field} n,est pas égale au champ {param}', 'validate_iban' => 'Le champ {field} doit contenir un IBAN valide', - 'validate_phone_number' => 'Le champ {field} doit contenir numéro de téléphone valide', + 'validate_phone_number' => 'Le champ {field} doit contenir un numéro de téléphone valide', 'validate_regex' => 'Le champ {field} doit contenir une valeur valide', 'validate_valid_json_string' => 'Le champ {field} doit avoir un format JSON', ); diff --git a/lang/id.php b/lang/id.php new file mode 100644 index 00000000..ca1debe5 --- /dev/null +++ b/lang/id.php @@ -0,0 +1,52 @@ + 'Bagian {field} harus diisi', + 'validate_valid_email' => 'Bagian {field} harus berisi alamat email yang benar', + 'validate_max_len' => 'Bagian {field} harus memiliki {param} karakter atau kurang', + 'validate_min_len' => 'Bagian {field} memiliki sedikitnya {param} karakter', + 'validate_exact_len' => 'Bagian {field} harus memiliki tepat {param} karakter', + 'validate_alpha' => 'Bagian {field} hanya boleh berisi huruf', + 'validate_alpha_numeric' => 'Bagian {field} hanya boleh berisi huruf dan angkat', + 'validate_alpha_numeric_space' => 'Bagian {field} hanya boleh berisi huruf, angkat dan spasi', + 'validate_alpha_dash' => 'Bagian {field} hanya boleh berisi huruf dan \'-\'', + 'validate_alpha_space' => 'Bagian {field} hanya boleh berisi huruf dan spasi', + 'validate_numeric' => 'Bagian {field} hanya boleh berisi angka', + 'validate_integer' => 'Bagian {field} hanya boleh berisi angka tanpa memiliki desimal', + 'validate_boolean' => 'Bagian {field} hanya boleh berisi true atau false', + 'validate_float' => 'Bagian {field} hanya boleh berisi angka yang memiliki desimal (float)', + 'validate_valid_url' => 'Bagian {field} harus berupa URL', + 'validate_url_exists' => 'Bagian {field} tidak memiliki URL didalamnya', + 'validate_valid_ip' => 'Bagian {field} harus berupa IP address yang benar', + 'validate_valid_ipv4' => 'Bagian {field} harus berupa IPv4 address yang benar', + 'validate_valid_ipv6' => 'Bagian {field} harus berupa IPv6 address yang benar', + 'validate_guidv4' => 'Bagian {field} harus berupa GUID yang benar', + 'validate_valid_cc' => 'Bagian {field} bukan merupakan nomor kartu kredit yang benar', + 'validate_valid_name' => 'Bagian {field} harus berupa nama lengkap', + 'validate_contains' => 'Bagian {field} hanya boleh berisi salah satu dari pilihan berikut: {param}', + 'validate_contains_list' => 'Bagian {field} bukan merupakan opsi yang benar', + 'validate_doesnt_contain_list' => 'Bagian {field} memiliki nilai yang tidak diperbolehkan', + 'validate_street_address' => 'Bagian {field} harus berupa alamat lengkap yang benar', + 'validate_date' => 'Bagian {field} harus memiliki format tanggal yang benar', + 'validate_min_numeric' => 'Bagian {field} hanya boleh berisi angka, yang memiliki karakter lebih besar atau sama dengan {param}', + 'validate_max_numeric' => 'Bagian {field} hanya boleh berisi angka, yang memiliki karakter lebih kecil atau sama dengan {param}', + 'validate_min_age' => 'Bagian {field}hanya boleh berisi \'umur\' yang lebih besar atau sama dengan {param}', + 'validate_invalid' => 'Bagian {field} memiliki nilai yang salah', + 'validate_starts' => 'Bagian {field} harus dimulai oleh {param}', + 'validate_extension' => 'Bagian {field} hanya boleh memiliki salah satu daru ekstensi: {param}', + 'validate_required_file' => 'Bagian {field} harus diisi', + 'validate_iban' => 'Bagian {field} harus berupa IBAN yang benar', + 'validate_equalsfield' => 'Bagian {field} harus sama dengan Bagian {param}', + 'validate_phone_number' => 'Bagian {field} harus berupa Nomor Telepon yang benar', + 'validate_regex' => 'Bagian {field} harus memiliki nilai dengan format yang benar', + 'validate_valid_json_string' => 'Bagian {field} harus memiliki format JSON yang benar', + 'validate_valid_array_size_greater' => 'Bagian {field} harus berupa array dengan ukuran lebih besar atau sama dengan {param}', + 'validate_valid_array_size_lesser' => 'Bagian {field} harus berupa array dengan ukuran lebih kecil atau sama dengan {param}', + 'validate_valid_array_size_equal' => 'Bagian {field} harus berupa array dengan ukuran {param}', + 'validate_valid_persian_name' => 'Bagian {field} seharusnya berisi nama Persian/Dari atau Arabic', + 'validate_valid_eng_per_pas_name' => 'Bagian {field} seharusnya berisi nama English, Persian/Dari/Pashtu atau Arabic', + 'validate_valid_persian_digit' => 'Bagian {field} seharusnya berisi angka dalam bahasa Persian/Dari atau Arabic', + 'validate_valid_persian_text' => 'Bagian {field} seharusnya berisi teks dalam bahasa Persian/Dari atau Arabic ', + 'validate_valid_pashtu_text' => 'Bagian {field} seharusnya berisi teks dalam bahasa Pashtu', + 'validate_valid_twitter' => 'Bagian {field} bukan merupakan format alamat twitter yang benar', +); diff --git a/lang/nl.php b/lang/nl.php new file mode 100644 index 00000000..50d907c7 --- /dev/null +++ b/lang/nl.php @@ -0,0 +1,42 @@ + 'Het veld {field} is verplicht', + 'validate_valid_email' => 'Het veld {field} moet een geldige e-mail zijn', + 'validate_max_len' => 'Het veld {field} moet een aantal tekens van {param} of minder hebben', + 'validate_min_len' => 'Het veld {field} moet een tekennummer van {param} of meer hebben', + 'validate_exact_len' => 'Het veld {field} moet een tekennummer van {param} hebben', + 'validate_alpha' => 'Het veld {field} mag alleen alfa (a-z) tekens bevatten', + 'validate_alpha_numeric' => 'Het veld {field} mag alleen alfanumerieke tekens bevatten (a-z)', + 'validate_alpha_dash' => 'Het veld {field} mag alleen alfa (a-z) en streepjes tekens bevatten', + 'validate_alpha_space' => 'Het veld {field} mag alleen alfa (a-z) tekens en spatie bevatten', + 'validate_numeric' => 'Het veld {field} mag alleen numerieke tekens bevatten', + 'validate_integer' => 'Het veld {field} moet een numerieke waarde zijn', + 'validate_boolean' => 'Het veld {field} moet waar of onwaar zijn', + 'validate_float' => 'Het veld {field} moet een decimale waarde zijn', + 'validate_valid_url' => 'Het veld {field} moet een geldige URL zijn', + 'validate_url_exists' => 'De {field} URL bestaat niet', + 'validate_valid_ip' => 'Het veld {field} moet een geldig IP-adres bevatten', + 'validate_valid_ipv4' => 'Het veld {field} moet een geldig IPv4-adres bevatten', + 'validate_valid_ipv6' => 'Het veld {field} moet een geldig IPv6-adres bevatten', + 'validate_guidv4' => 'Het veld {field} moet een geldige GUID bevatten', + 'validate_valid_cc' => 'Het veld {field} moet een geldig creditcardnummer bevatten', + 'validate_valid_name' => 'Het veld {field} moet een geldige naam bevatten', + 'validate_contains' => 'Het veld {field} moet een van deze waarden bevatten: {param}', + 'validate_contains_list' => 'Het veld {field} moet een waarde uit het vervolgkeuzemenu bevatten', + 'validate_doesnt_contain_list' => 'Het veld {field} bevat een waarde die niet acceptabel is', + 'validate_street_address' => 'Het veld {field} moet een geldig postadres zijn', + 'validate_date' => 'Het veld {field} moet een geldige datum zijn', + 'validate_min_numeric' => 'Het veld {field} moet een numerieke waarde gelijk aan of groter zijn dan {param}', + 'validate_max_numeric' => 'Het veld {field} moet een numerieke waarde gelijk aan of kleiner zijn dan {param}', + 'validate_min_age' => 'Het veld {field} moet gelijk zijn aan of groter zijn dan {param}', + 'validate_invalid' => 'Het veld {field} is ongeldig', + 'validate_starts' => 'Het veld {field} moet beginnen met {param}', + 'validate_extension' => 'Het veld {field} moet de volgende extensies hebben {parameter}', + 'validate_required_file' => 'Het veld {field} is verplicht', + 'validate_equalsfield' => 'Het veld {field} is niet gelijk aan het veld {param}', + 'validate_iban' => 'Het veld {field} moet een geldige IBAN bevatten', + 'validate_phone_number' => 'Het veld {field} moet een geldig telefoonnummer bevatten', + 'validate_regex' => 'Het veld {field} moet een geldige waarde bevatten', + 'validate_valid_json_string' => 'Het veld {field} moet een JSON-indeling hebben', + ); diff --git a/lang/tr.php b/lang/tr.php new file mode 100644 index 00000000..94c47a30 --- /dev/null +++ b/lang/tr.php @@ -0,0 +1,46 @@ + '{field} alanı zorunludur', + 'validate_valid_email' => '{field} alanı geçerli bir e-posta adresi olmalı', + 'validate_max_len' => '{field} alanı en fazla {param} karakter veya daha az olmalı', + 'validate_min_len' => '{field} alanı en az {param} karakter olmalı', + 'validate_exact_len' => '{field} alanı tam {param} karakter olmalı', + 'validate_alpha' => '{field} alanı sadece harflerden oluşabilir', + 'validate_alpha_numeric' => '{field} alanı sadece harf ve sayılardan oluşabilir', + 'validate_alpha_numeric_space' => '{field} alanı sadece harf, sayı ve boşluklardan oluşabilir', + 'validate_alpha_dash' => '{field} alanı sadece harf ve çizgilerden oluşabilir', + 'validate_alpha_space' => '{field} alanı sadece harf ve boşluklardan oluşabilir', + 'validate_numeric' => '{field} alanı bir sayı olmalı', + 'validate_integer' => '{field} alanı sadece tam sayı olabilir', + 'validate_boolean' => '{field} alanı Doğru yada Yanlış olmak zorunda', + 'validate_float' => '{field} alanı ondalık noktası olan bir sayı olmalı (float)', + 'validate_valid_url' => '{field} alanı URL olmak zorunda', + 'validate_url_exists' => '{field} URL bulunamadı', + 'validate_valid_ip' => '{field} alanı geçerli bir IP adresi olamlı', + 'validate_valid_ipv4' => '{field} alanı geçerli bir IPv4 adresi içermesi gerekiyor', + 'validate_valid_ipv6' => '{field} alanı geçerli bir IPv6 adresi içermesi gerekiyor', + 'validate_guidv4' => '{field} alanı geçerli bir GUID içermesi gerekiyor', + 'validate_valid_cc' => '{field} geçerli bir kredi kartı numarası değil', + 'validate_valid_name' => '{field} tam isim olmalı', + 'validate_contains' => '{field} sadece aşağıdakilerden biri olabilir: {param}', + 'validate_contains_list' => '{field} geçerli bir seçenek değil', + 'validate_doesnt_contain_list' => '{field} alanı kabul edilmeyen bir değer içeriyor', + 'validate_street_address' => '{field} alanı geçerli bir sokak adresi olmalı', + 'validate_date' => '{field} geçerli bir tarih olmalı', + 'validate_min_numeric' => '{field} alanı {param} veya ondan yüksek sayısal bir değer olması gerekir', + 'validate_max_numeric' => '{field} alanı {param} veya ondan düşük sayısal bir değer olması gerekir', + 'validate_min_age' => '{field} alanı {param} veya daha büyük bir yaşta olması gerekir', + 'validate_invalid' => '{field} alanı geçersiz', + 'validate_starts' => '{field} alanı {param} ile başlamalıdır', + 'validate_extension' => '{field} alanı Aşağıdaki uzantılardan yalnızca biri olabilir: {param}', + 'validate_required_file' => '{field} alanı zorunlu', + 'validate_equalsfield' => '{field} alanı {param} alanına eşit değil.', + 'validate_iban' => '{field} alanı geçerli bir IBAN olmalı', + 'validate_phone_number' => '{field} alanı geçerli bir telefon numarası olmalı', + 'validate_regex' => '{field} alanı geçerli biçime sahip bir değer içermesi gerekiyor', + 'validate_valid_json_string' => '{field} alanı geçerli bir JSON biçiminde dize içermesi gerekiyor', + 'validate_valid_array_size_greater' => '{field} alanı {param} veya daha yüksek bir dizi olması gerekir', + 'validate_valid_array_size_lesser' => '{field} alanı {param} veya daha küçük bir dizi olması gerekir', + 'validate_valid_array_size_equal' => '{field} alanı {param} boyutuna eşit bir dizi olması gerekiyor', +);