From 377dde8078269f5aae59b4742e6cbea1a8e47076 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 17:55:07 -0300 Subject: [PATCH 1/7] Add Translates --- translates/es/src/Attribute.php | 309 +++++++ translates/es/src/ErrorBag.php | 247 ++++++ translates/es/src/Helper.php | 258 ++++++ translates/es/src/MimeTypeGuesser.php | 804 ++++++++++++++++++ .../src/MissingRequiredParameterException.php | 7 + translates/es/src/Rule.php | 232 +++++ translates/es/src/RuleNotFoundException.php | 9 + translates/es/src/RuleQuashException.php | 7 + translates/es/src/Rules/Accepted.php | 26 + translates/es/src/Rules/After.php | 40 + translates/es/src/Rules/Alpha.php | 23 + translates/es/src/Rules/AlphaDash.php | 27 + translates/es/src/Rules/AlphaNum.php | 27 + translates/es/src/Rules/AlphaSpaces.php | 27 + translates/es/src/Rules/Before.php | 39 + translates/es/src/Rules/Between.php | 38 + translates/es/src/Rules/Boolean.php | 23 + translates/es/src/Rules/Callback.php | 58 ++ translates/es/src/Rules/Date.php | 34 + translates/es/src/Rules/Defaults.php | 50 ++ translates/es/src/Rules/Different.php | 31 + translates/es/src/Rules/Digits.php | 31 + translates/es/src/Rules/DigitsBetween.php | 34 + translates/es/src/Rules/Email.php | 23 + translates/es/src/Rules/Extension.php | 50 ++ translates/es/src/Rules/In.php | 61 ++ translates/es/src/Rules/Integer.php | 23 + .../src/Rules/Interfaces/BeforeValidate.php | 13 + .../es/src/Rules/Interfaces/ModifyValue.php | 15 + translates/es/src/Rules/Ip.php | 23 + translates/es/src/Rules/Ipv4.php | 23 + translates/es/src/Rules/Ipv6.php | 23 + translates/es/src/Rules/Json.php | 33 + translates/es/src/Rules/Lowercase.php | 23 + translates/es/src/Rules/Max.php | 36 + translates/es/src/Rules/Mimes.php | 95 +++ translates/es/src/Rules/Min.php | 36 + translates/es/src/Rules/NotIn.php | 61 ++ translates/es/src/Rules/Nullable.php | 19 + translates/es/src/Rules/Numeric.php | 23 + translates/es/src/Rules/Present.php | 39 + translates/es/src/Rules/Regex.php | 28 + translates/es/src/Rules/Required.php | 51 ++ translates/es/src/Rules/RequiredIf.php | 52 ++ translates/es/src/Rules/RequiredUnless.php | 52 ++ translates/es/src/Rules/RequiredWith.php | 49 ++ translates/es/src/Rules/RequiredWithAll.php | 49 ++ translates/es/src/Rules/RequiredWithout.php | 49 ++ .../es/src/Rules/RequiredWithoutAll.php | 49 ++ translates/es/src/Rules/Same.php | 31 + .../es/src/Rules/Traits/DateUtilsTrait.php | 43 + translates/es/src/Rules/Traits/FileTrait.php | 86 ++ translates/es/src/Rules/Traits/SizeTrait.php | 109 +++ translates/es/src/Rules/TypeArray.php | 23 + translates/es/src/Rules/UploadedFile.php | 184 ++++ translates/es/src/Rules/Uppercase.php | 23 + translates/es/src/Rules/Url.php | 115 +++ translates/es/src/Traits/MessagesTrait.php | 54 ++ .../es/src/Traits/TranslationsTrait.php | 54 ++ translates/es/src/Validation.php | 716 ++++++++++++++++ translates/es/src/Validator.php | 221 +++++ 61 files changed, 5038 insertions(+) create mode 100644 translates/es/src/Attribute.php create mode 100644 translates/es/src/ErrorBag.php create mode 100644 translates/es/src/Helper.php create mode 100644 translates/es/src/MimeTypeGuesser.php create mode 100644 translates/es/src/MissingRequiredParameterException.php create mode 100644 translates/es/src/Rule.php create mode 100644 translates/es/src/RuleNotFoundException.php create mode 100644 translates/es/src/RuleQuashException.php create mode 100644 translates/es/src/Rules/Accepted.php create mode 100644 translates/es/src/Rules/After.php create mode 100644 translates/es/src/Rules/Alpha.php create mode 100644 translates/es/src/Rules/AlphaDash.php create mode 100644 translates/es/src/Rules/AlphaNum.php create mode 100644 translates/es/src/Rules/AlphaSpaces.php create mode 100644 translates/es/src/Rules/Before.php create mode 100644 translates/es/src/Rules/Between.php create mode 100644 translates/es/src/Rules/Boolean.php create mode 100644 translates/es/src/Rules/Callback.php create mode 100644 translates/es/src/Rules/Date.php create mode 100644 translates/es/src/Rules/Defaults.php create mode 100644 translates/es/src/Rules/Different.php create mode 100644 translates/es/src/Rules/Digits.php create mode 100644 translates/es/src/Rules/DigitsBetween.php create mode 100644 translates/es/src/Rules/Email.php create mode 100644 translates/es/src/Rules/Extension.php create mode 100644 translates/es/src/Rules/In.php create mode 100644 translates/es/src/Rules/Integer.php create mode 100644 translates/es/src/Rules/Interfaces/BeforeValidate.php create mode 100644 translates/es/src/Rules/Interfaces/ModifyValue.php create mode 100644 translates/es/src/Rules/Ip.php create mode 100644 translates/es/src/Rules/Ipv4.php create mode 100644 translates/es/src/Rules/Ipv6.php create mode 100644 translates/es/src/Rules/Json.php create mode 100644 translates/es/src/Rules/Lowercase.php create mode 100644 translates/es/src/Rules/Max.php create mode 100644 translates/es/src/Rules/Mimes.php create mode 100644 translates/es/src/Rules/Min.php create mode 100644 translates/es/src/Rules/NotIn.php create mode 100644 translates/es/src/Rules/Nullable.php create mode 100644 translates/es/src/Rules/Numeric.php create mode 100644 translates/es/src/Rules/Present.php create mode 100644 translates/es/src/Rules/Regex.php create mode 100644 translates/es/src/Rules/Required.php create mode 100644 translates/es/src/Rules/RequiredIf.php create mode 100644 translates/es/src/Rules/RequiredUnless.php create mode 100644 translates/es/src/Rules/RequiredWith.php create mode 100644 translates/es/src/Rules/RequiredWithAll.php create mode 100644 translates/es/src/Rules/RequiredWithout.php create mode 100644 translates/es/src/Rules/RequiredWithoutAll.php create mode 100644 translates/es/src/Rules/Same.php create mode 100644 translates/es/src/Rules/Traits/DateUtilsTrait.php create mode 100644 translates/es/src/Rules/Traits/FileTrait.php create mode 100644 translates/es/src/Rules/Traits/SizeTrait.php create mode 100644 translates/es/src/Rules/TypeArray.php create mode 100644 translates/es/src/Rules/UploadedFile.php create mode 100644 translates/es/src/Rules/Uppercase.php create mode 100644 translates/es/src/Rules/Url.php create mode 100644 translates/es/src/Traits/MessagesTrait.php create mode 100644 translates/es/src/Traits/TranslationsTrait.php create mode 100644 translates/es/src/Validation.php create mode 100644 translates/es/src/Validator.php diff --git a/translates/es/src/Attribute.php b/translates/es/src/Attribute.php new file mode 100644 index 0000000..ebd7a11 --- /dev/null +++ b/translates/es/src/Attribute.php @@ -0,0 +1,309 @@ +validation = $validation; + $this->alias = $alias; + $this->key = $key; + foreach ($rules as $rule) { + $this->addRule($rule); + } + } + + /** + * Set the primary attribute + * + * @param \Rakit\Validation\Attribute $primaryAttribute + * @return void + */ + public function setPrimaryAttribute(Attribute $primaryAttribute) + { + $this->primaryAttribute = $primaryAttribute; + } + + /** + * Set key indexes + * + * @param array $keyIndexes + * @return void + */ + public function setKeyIndexes(array $keyIndexes) + { + $this->keyIndexes = $keyIndexes; + } + + /** + * Get primary attributes + * + * @return \Rakit\Validation\Attribute|null + */ + public function getPrimaryAttribute() + { + return $this->primaryAttribute; + } + + /** + * Set other attributes + * + * @param array $otherAttributes + * @return void + */ + public function setOtherAttributes(array $otherAttributes) + { + $this->otherAttributes = []; + foreach ($otherAttributes as $otherAttribute) { + $this->addOtherAttribute($otherAttribute); + } + } + + /** + * Add other attributes + * + * @param \Rakit\Validation\Attribute $otherAttribute + * @return void + */ + public function addOtherAttribute(Attribute $otherAttribute) + { + $this->otherAttributes[] = $otherAttribute; + } + + /** + * Get other attributes + * + * @return array + */ + public function getOtherAttributes(): array + { + return $this->otherAttributes; + } + + /** + * Add rule + * + * @param \Rakit\Validation\Rule $rule + * @return void + */ + public function addRule(Rule $rule) + { + $rule->setAttribute($this); + $rule->setValidation($this->validation); + $this->rules[$rule->getKey()] = $rule; + } + + /** + * Get rule + * + * @param string $ruleKey + * @return void + */ + public function getRule(string $ruleKey) + { + return $this->hasRule($ruleKey)? $this->rules[$ruleKey] : null; + } + + /** + * Get rules + * + * @return array + */ + public function getRules(): array + { + return $this->rules; + } + + /** + * Check the $ruleKey has in the rule + * + * @param string $ruleKey + * @return bool + */ + public function hasRule(string $ruleKey): bool + { + return isset($this->rules[$ruleKey]); + } + + /** + * Set required + * + * @param boolean $required + * @return void + */ + public function setRequired(bool $required) + { + $this->required = $required; + } + + /** + * Set rule is required + * + * @return boolean + */ + public function isRequired(): bool + { + return $this->required; + } + + /** + * Get key + * + * @return string + */ + public function getKey(): string + { + return $this->key; + } + + /** + * Get key indexes + * + * @return array + */ + public function getKeyIndexes(): array + { + return $this->keyIndexes; + } + + /** + * Get value + * + * @param string|null $key + * @return mixed + */ + public function getValue(string $key = null) + { + if ($key && $this->isArrayAttribute()) { + $key = $this->resolveSiblingKey($key); + } + + if (!$key) { + $key = $this->getKey(); + } + + return $this->validation->getValue($key); + } + + /** + * Get that is array attribute + * + * @return boolean + */ + public function isArrayAttribute(): bool + { + return count($this->getKeyIndexes()) > 0; + } + + /** + * Check this attribute is using dot notation + * + * @return boolean + */ + public function isUsingDotNotation(): bool + { + return strpos($this->getKey(), '.') !== false; + } + + /** + * Resolve sibling key + * + * @param string $key + * @return string + */ + public function resolveSiblingKey(string $key): string + { + $indexes = $this->getKeyIndexes(); + $keys = explode("*", $key); + $countAsterisks = count($keys) - 1; + if (count($indexes) < $countAsterisks) { + $indexes = array_merge($indexes, array_fill(0, $countAsterisks - count($indexes), "*")); + } + $args = array_merge([str_replace("*", "%s", $key)], $indexes); + return call_user_func_array('sprintf', $args); + } + + /** + * Get humanize key + * + * @return string + */ + public function getHumanizedKey() + { + $primaryAttribute = $this->getPrimaryAttribute(); + $key = str_replace('_', ' ', $this->key); + + // Resolve key from array validation + if ($primaryAttribute) { + $split = explode('.', $key); + $key = implode(' ', array_map(function ($word) { + if (is_numeric($word)) { + $word = $word + 1; + } + return Helper::snakeCase($word, ' '); + }, $split)); + } + + return ucfirst($key); + } + + /** + * Set alias + * + * @param string $alias + * @return void + */ + public function setAlias(string $alias) + { + $this->alias = $alias; + } + + /** + * Get alias + * + * @return string|null + */ + public function getAlias() + { + return $this->alias; + } +} diff --git a/translates/es/src/ErrorBag.php b/translates/es/src/ErrorBag.php new file mode 100644 index 0000000..2836d4a --- /dev/null +++ b/translates/es/src/ErrorBag.php @@ -0,0 +1,247 @@ +messages = $messages; + } + + /** + * Add message for given key and rule + * + * @param string $key + * @param string $rule + * @param string $message + * @return void + */ + public function add(string $key, string $rule, string $message) + { + if (!isset($this->messages[$key])) { + $this->messages[$key] = []; + } + + $this->messages[$key][$rule] = $message; + } + + /** + * Get messages count + * + * @return int + */ + public function count(): int + { + return count($this->all()); + } + + /** + * Check given key is existed + * + * @param string $key + * @return bool + */ + public function has(string $key): bool + { + list($key, $ruleName) = $this->parsekey($key); + if ($this->isWildcardKey($key)) { + $messages = $this->filterMessagesForWildcardKey($key, $ruleName); + return count(Helper::arrayDot($messages)) > 0; + } else { + $messages = isset($this->messages[$key])? $this->messages[$key] : null; + + if (!$ruleName) { + return !empty($messages); + } else { + return !empty($messages) and isset($messages[$ruleName]); + } + } + } + + /** + * Get the first value of array + * + * @param string $key + * @return mixed + */ + public function first(string $key) + { + list($key, $ruleName) = $this->parsekey($key); + if ($this->isWildcardKey($key)) { + $messages = $this->filterMessagesForWildcardKey($key, $ruleName); + $flattenMessages = Helper::arrayDot($messages); + return array_shift($flattenMessages); + } else { + $keyMessages = isset($this->messages[$key])? $this->messages[$key] : []; + + if (empty($keyMessages)) { + return null; + } + + if ($ruleName) { + return isset($keyMessages[$ruleName])? $keyMessages[$ruleName] : null; + } else { + return array_shift($keyMessages); + } + } + } + + /** + * Get messages from given key, can be use custom format + * + * @param string $key + * @param string $format + * @return array + */ + public function get(string $key, string $format = ':message'): array + { + list($key, $ruleName) = $this->parsekey($key); + $results = []; + if ($this->isWildcardKey($key)) { + $messages = $this->filterMessagesForWildcardKey($key, $ruleName); + foreach ($messages as $explicitKey => $keyMessages) { + foreach ($keyMessages as $rule => $message) { + $results[$explicitKey][$rule] = $this->formatMessage($message, $format); + } + } + } else { + $keyMessages = isset($this->messages[$key])? $this->messages[$key] : []; + foreach ($keyMessages as $rule => $message) { + if ($ruleName and $ruleName != $rule) { + continue; + } + $results[$rule] = $this->formatMessage($message, $format); + } + } + + return $results; + } + + /** + * Get all messages + * + * @param string $format + * @return array + */ + public function all(string $format = ':message'): array + { + $messages = $this->messages; + $results = []; + foreach ($messages as $key => $keyMessages) { + foreach ($keyMessages as $message) { + $results[] = $this->formatMessage($message, $format); + } + } + return $results; + } + + /** + * Get the first message from existing keys + * + * @param string $format + * @param boolean $dotNotation + * @return array + */ + public function firstOfAll(string $format = ':message', bool $dotNotation = false): array + { + $messages = $this->messages; + $results = []; + foreach ($messages as $key => $keyMessages) { + if ($dotNotation) { + $results[$key] = $this->formatMessage(array_shift($messages[$key]), $format); + } else { + Helper::arraySet($results, $key, $this->formatMessage(array_shift($messages[$key]), $format)); + } + } + return $results; + } + + /** + * Get plain array messages + * + * @return array + */ + public function toArray(): array + { + return $this->messages; + } + + /** + * Parse $key to get the array of $key and $ruleName + * + * @param string $key + * @return array + */ + protected function parseKey(string $key): array + { + $expl = explode(':', $key, 2); + $key = $expl[0]; + $ruleName = isset($expl[1])? $expl[1] : null; + return [$key, $ruleName]; + } + + /** + * Check the $key is wildcard + * + * @param mixed $key + * @return bool + */ + protected function isWildcardKey(string $key): bool + { + return false !== strpos($key, '*'); + } + + /** + * Filter messages with wildcard key + * + * @param string $key + * @param mixed $ruleName + * @return array + */ + protected function filterMessagesForWildcardKey(string $key, $ruleName = null): array + { + $messages = $this->messages; + $pattern = preg_quote($key, '#'); + $pattern = str_replace('\*', '.*', $pattern); + + $filteredMessages = []; + + foreach ($messages as $k => $keyMessages) { + if ((bool) preg_match('#^'.$pattern.'\z#u', $k) === false) { + continue; + } + + foreach ($keyMessages as $rule => $message) { + if ($ruleName and $rule != $ruleName) { + continue; + } + $filteredMessages[$k][$rule] = $message; + } + } + + return $filteredMessages; + } + + /** + * Get formatted message + * + * @param string $message + * @param string $format + * @return string + */ + protected function formatMessage(string $message, string $format): string + { + return str_replace(':message', $message, $format); + } +} diff --git a/translates/es/src/Helper.php b/translates/es/src/Helper.php new file mode 100644 index 0000000..06e0ada --- /dev/null +++ b/translates/es/src/Helper.php @@ -0,0 +1,258 @@ + $value) { + if (is_array($value) && ! empty($value)) { + $results = array_merge($results, static::arrayDot($value, $prepend.$key.'.')); + } else { + $results[$prepend.$key] = $value; + } + } + + return $results; + } + + /** + * Set an item on an array or object using dot notation. + * Adapted from: https://github.com/illuminate/support/blob/v5.3.23/helpers.php#L437 + * + * @param mixed $target + * @param string|array|null $key + * @param mixed $value + * @param bool $overwrite + * @return mixed + */ + public static function arraySet(&$target, $key, $value, $overwrite = true): array + { + if (is_null($key)) { + if ($overwrite) { + return $target = array_merge($target, $value); + } + return $target = array_merge($value, $target); + } + + $segments = is_array($key) ? $key : explode('.', $key); + + if (($segment = array_shift($segments)) === '*') { + if (! is_array($target)) { + $target = []; + } + + if ($segments) { + foreach ($target as &$inner) { + static::arraySet($inner, $segments, $value, $overwrite); + } + } elseif ($overwrite) { + foreach ($target as &$inner) { + $inner = $value; + } + } + } elseif (is_array($target)) { + if ($segments) { + if (! array_key_exists($segment, $target)) { + $target[$segment] = []; + } + + static::arraySet($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite || ! array_key_exists($segment, $target)) { + $target[$segment] = $value; + } + } else { + $target = []; + + if ($segments) { + static::arraySet($target[$segment], $segments, $value, $overwrite); + } elseif ($overwrite) { + $target[$segment] = $value; + } + } + + return $target; + } + + /** + * Unset an item on an array or object using dot notation. + * + * @param mixed $target + * @param string|array $key + * @return mixed + */ + public static function arrayUnset(&$target, $key) + { + if (!is_array($target)) { + return $target; + } + + $segments = is_array($key) ? $key : explode('.', $key); + $segment = array_shift($segments); + + if ($segment == '*') { + $target = []; + } elseif ($segments) { + if (array_key_exists($segment, $target)) { + static::arrayUnset($target[$segment], $segments); + } + } elseif (array_key_exists($segment, $target)) { + unset($target[$segment]); + } + + return $target; + } + + /** + * Get snake_case format from given string + * + * @param string $value + * @param string $delimiter + * @return string + */ + public static function snakeCase(string $value, string $delimiter = '_'): string + { + if (! ctype_lower($value)) { + $value = preg_replace('/\s+/u', '', ucwords($value)); + $value = strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); + } + + return $value; + } + + /** + * Join string[] to string with given $separator and $lastSeparator. + * + * @param array $pieces + * @param string $separator + * @param string|null $lastSeparator + * @return string + */ + public static function join(array $pieces, string $separator, string $lastSeparator = null): string + { + if (is_null($lastSeparator)) { + $lastSeparator = $separator; + } + + $last = array_pop($pieces); + + switch (count($pieces)) { + case 0: + return $last ?: ''; + case 1: + return $pieces[0] . $lastSeparator . $last; + default: + return implode($separator, $pieces) . $lastSeparator . $last; + } + } + + /** + * Wrap string[] by given $prefix and $suffix + * + * @param array $strings + * @param string $prefix + * @param string|null $suffix + * @return array + */ + public static function wraps(array $strings, string $prefix, string $suffix = null): array + { + if (is_null($suffix)) { + $suffix = $prefix; + } + + return array_map(function ($str) use ($prefix, $suffix) { + return $prefix . $str . $suffix; + }, $strings); + } +} diff --git a/translates/es/src/MimeTypeGuesser.php b/translates/es/src/MimeTypeGuesser.php new file mode 100644 index 0000000..3efe69e --- /dev/null +++ b/translates/es/src/MimeTypeGuesser.php @@ -0,0 +1,804 @@ + 'ez', + 'application/applixware' => 'aw', + 'application/atom+xml' => 'atom', + 'application/atomcat+xml' => 'atomcat', + 'application/atomsvc+xml' => 'atomsvc', + 'application/ccxml+xml' => 'ccxml', + 'application/cdmi-capability' => 'cdmia', + 'application/cdmi-container' => 'cdmic', + 'application/cdmi-domain' => 'cdmid', + 'application/cdmi-object' => 'cdmio', + 'application/cdmi-queue' => 'cdmiq', + 'application/cu-seeme' => 'cu', + 'application/davmount+xml' => 'davmount', + 'application/docbook+xml' => 'dbk', + 'application/dssc+der' => 'dssc', + 'application/dssc+xml' => 'xdssc', + 'application/ecmascript' => 'ecma', + 'application/emma+xml' => 'emma', + 'application/epub+zip' => 'epub', + 'application/exi' => 'exi', + 'application/font-tdpfr' => 'pfr', + 'application/gml+xml' => 'gml', + 'application/gpx+xml' => 'gpx', + 'application/gxf' => 'gxf', + 'application/hyperstudio' => 'stk', + 'application/inkml+xml' => 'ink', + 'application/ipfix' => 'ipfix', + 'application/java-archive' => 'jar', + 'application/java-serialized-object' => 'ser', + 'application/java-vm' => 'class', + 'application/javascript' => 'js', + 'application/json' => 'json', + 'application/jsonml+json' => 'jsonml', + 'application/lost+xml' => 'lostxml', + 'application/mac-binhex40' => 'hqx', + 'application/mac-compactpro' => 'cpt', + 'application/mads+xml' => 'mads', + 'application/marc' => 'mrc', + 'application/marcxml+xml' => 'mrcx', + 'application/mathematica' => 'ma', + 'application/mathml+xml' => 'mathml', + 'application/mbox' => 'mbox', + 'application/mediaservercontrol+xml' => 'mscml', + 'application/metalink+xml' => 'metalink', + 'application/metalink4+xml' => 'meta4', + 'application/mets+xml' => 'mets', + 'application/mods+xml' => 'mods', + 'application/mp21' => 'm21', + 'application/mp4' => 'mp4s', + 'application/msword' => 'doc', + 'application/mxf' => 'mxf', + 'application/octet-stream' => 'bin', + 'application/oda' => 'oda', + 'application/oebps-package+xml' => 'opf', + 'application/ogg' => 'ogx', + 'application/omdoc+xml' => 'omdoc', + 'application/onenote' => 'onetoc', + 'application/oxps' => 'oxps', + 'application/patch-ops-error+xml' => 'xer', + 'application/pdf' => 'pdf', + 'application/pgp-encrypted' => 'pgp', + 'application/pgp-signature' => 'asc', + 'application/pics-rules' => 'prf', + 'application/pkcs10' => 'p10', + 'application/pkcs7-mime' => 'p7m', + 'application/pkcs7-signature' => 'p7s', + 'application/pkcs8' => 'p8', + 'application/pkix-attr-cert' => 'ac', + 'application/pkix-cert' => 'cer', + 'application/pkix-crl' => 'crl', + 'application/pkix-pkipath' => 'pkipath', + 'application/pkixcmp' => 'pki', + 'application/pls+xml' => 'pls', + 'application/postscript' => 'ai', + 'application/prs.cww' => 'cww', + 'application/pskc+xml' => 'pskcxml', + 'application/rdf+xml' => 'rdf', + 'application/reginfo+xml' => 'rif', + 'application/relax-ng-compact-syntax' => 'rnc', + 'application/resource-lists+xml' => 'rl', + 'application/resource-lists-diff+xml' => 'rld', + 'application/rls-services+xml' => 'rs', + 'application/rpki-ghostbusters' => 'gbr', + 'application/rpki-manifest' => 'mft', + 'application/rpki-roa' => 'roa', + 'application/rsd+xml' => 'rsd', + 'application/rss+xml' => 'rss', + 'application/rtf' => 'rtf', + 'application/sbml+xml' => 'sbml', + 'application/scvp-cv-request' => 'scq', + 'application/scvp-cv-response' => 'scs', + 'application/scvp-vp-request' => 'spq', + 'application/scvp-vp-response' => 'spp', + 'application/sdp' => 'sdp', + 'application/set-payment-initiation' => 'setpay', + 'application/set-registration-initiation' => 'setreg', + 'application/shf+xml' => 'shf', + 'application/smil+xml' => 'smi', + 'application/sparql-query' => 'rq', + 'application/sparql-results+xml' => 'srx', + 'application/srgs' => 'gram', + 'application/srgs+xml' => 'grxml', + 'application/sru+xml' => 'sru', + 'application/ssdl+xml' => 'ssdl', + 'application/ssml+xml' => 'ssml', + 'application/tei+xml' => 'tei', + 'application/thraud+xml' => 'tfi', + 'application/timestamped-data' => 'tsd', + 'application/vnd.3gpp.pic-bw-large' => 'plb', + 'application/vnd.3gpp.pic-bw-small' => 'psb', + 'application/vnd.3gpp.pic-bw-var' => 'pvb', + 'application/vnd.3gpp2.tcap' => 'tcap', + 'application/vnd.3m.post-it-notes' => 'pwn', + 'application/vnd.accpac.simply.aso' => 'aso', + 'application/vnd.accpac.simply.imp' => 'imp', + 'application/vnd.acucobol' => 'acu', + 'application/vnd.acucorp' => 'atc', + 'application/vnd.adobe.air-application-installer-package+zip' => 'air', + 'application/vnd.adobe.formscentral.fcdt' => 'fcdt', + 'application/vnd.adobe.fxp' => 'fxp', + 'application/vnd.adobe.xdp+xml' => 'xdp', + 'application/vnd.adobe.xfdf' => 'xfdf', + 'application/vnd.ahead.space' => 'ahead', + 'application/vnd.airzip.filesecure.azf' => 'azf', + 'application/vnd.airzip.filesecure.azs' => 'azs', + 'application/vnd.amazon.ebook' => 'azw', + 'application/vnd.americandynamics.acc' => 'acc', + 'application/vnd.amiga.ami' => 'ami', + 'application/vnd.android.package-archive' => 'apk', + 'application/vnd.anser-web-certificate-issue-initiation' => 'cii', + 'application/vnd.anser-web-funds-transfer-initiation' => 'fti', + 'application/vnd.antix.game-component' => 'atx', + 'application/vnd.apple.installer+xml' => 'mpkg', + 'application/vnd.apple.mpegurl' => 'm3u8', + 'application/vnd.aristanetworks.swi' => 'swi', + 'application/vnd.astraea-software.iota' => 'iota', + 'application/vnd.audiograph' => 'aep', + 'application/vnd.blueice.multipass' => 'mpm', + 'application/vnd.bmi' => 'bmi', + 'application/vnd.businessobjects' => 'rep', + 'application/vnd.chemdraw+xml' => 'cdxml', + 'application/vnd.chipnuts.karaoke-mmd' => 'mmd', + 'application/vnd.cinderella' => 'cdy', + 'application/vnd.claymore' => 'cla', + 'application/vnd.cloanto.rp9' => 'rp9', + 'application/vnd.clonk.c4group' => 'c4g', + 'application/vnd.cluetrust.cartomobile-config' => 'c11amc', + 'application/vnd.cluetrust.cartomobile-config-pkg' => 'c11amz', + 'application/vnd.commonspace' => 'csp', + 'application/vnd.contact.cmsg' => 'cdbcmsg', + 'application/vnd.cosmocaller' => 'cmc', + 'application/vnd.crick.clicker' => 'clkx', + 'application/vnd.crick.clicker.keyboard' => 'clkk', + 'application/vnd.crick.clicker.palette' => 'clkp', + 'application/vnd.crick.clicker.template' => 'clkt', + 'application/vnd.crick.clicker.wordbank' => 'clkw', + 'application/vnd.criticaltools.wbs+xml' => 'wbs', + 'application/vnd.ctc-posml' => 'pml', + 'application/vnd.cups-ppd' => 'ppd', + 'application/vnd.curl.car' => 'car', + 'application/vnd.curl.pcurl' => 'pcurl', + 'application/vnd.dart' => 'dart', + 'application/vnd.data-vision.rdz' => 'rdz', + 'application/vnd.dece.data' => 'uvf', + 'application/vnd.dece.ttml+xml' => 'uvt', + 'application/vnd.dece.unspecified' => 'uvx', + 'application/vnd.dece.zip' => 'uvz', + 'application/vnd.denovo.fcselayout-link' => 'fe_launch', + 'application/vnd.dna' => 'dna', + 'application/vnd.dolby.mlp' => 'mlp', + 'application/vnd.dpgraph' => 'dpg', + 'application/vnd.dreamfactory' => 'dfac', + 'application/vnd.ds-keypoint' => 'kpxx', + 'application/vnd.dvb.ait' => 'ait', + 'application/vnd.dvb.service' => 'svc', + 'application/vnd.dynageo' => 'geo', + 'application/vnd.ecowin.chart' => 'mag', + 'application/vnd.enliven' => 'nml', + 'application/vnd.epson.esf' => 'esf', + 'application/vnd.epson.msf' => 'msf', + 'application/vnd.epson.quickanime' => 'qam', + 'application/vnd.epson.salt' => 'slt', + 'application/vnd.epson.ssf' => 'ssf', + 'application/vnd.eszigno3+xml' => 'es3', + 'application/vnd.ezpix-album' => 'ez2', + 'application/vnd.ezpix-package' => 'ez3', + 'application/vnd.fdf' => 'fdf', + 'application/vnd.fdsn.mseed' => 'mseed', + 'application/vnd.fdsn.seed' => 'seed', + 'application/vnd.flographit' => 'gph', + 'application/vnd.fluxtime.clip' => 'ftc', + 'application/vnd.framemaker' => 'fm', + 'application/vnd.frogans.fnc' => 'fnc', + 'application/vnd.frogans.ltf' => 'ltf', + 'application/vnd.fsc.weblaunch' => 'fsc', + 'application/vnd.fujitsu.oasys' => 'oas', + 'application/vnd.fujitsu.oasys2' => 'oa2', + 'application/vnd.fujitsu.oasys3' => 'oa3', + 'application/vnd.fujitsu.oasysgp' => 'fg5', + 'application/vnd.fujitsu.oasysprs' => 'bh2', + 'application/vnd.fujixerox.ddd' => 'ddd', + 'application/vnd.fujixerox.docuworks' => 'xdw', + 'application/vnd.fujixerox.docuworks.binder' => 'xbd', + 'application/vnd.fuzzysheet' => 'fzs', + 'application/vnd.genomatix.tuxedo' => 'txd', + 'application/vnd.geogebra.file' => 'ggb', + 'application/vnd.geogebra.tool' => 'ggt', + 'application/vnd.geometry-explorer' => 'gex', + 'application/vnd.geonext' => 'gxt', + 'application/vnd.geoplan' => 'g2w', + 'application/vnd.geospace' => 'g3w', + 'application/vnd.gmx' => 'gmx', + 'application/vnd.google-earth.kml+xml' => 'kml', + 'application/vnd.google-earth.kmz' => 'kmz', + 'application/vnd.grafeq' => 'gqf', + 'application/vnd.groove-account' => 'gac', + 'application/vnd.groove-help' => 'ghf', + 'application/vnd.groove-identity-message' => 'gim', + 'application/vnd.groove-injector' => 'grv', + 'application/vnd.groove-tool-message' => 'gtm', + 'application/vnd.groove-tool-template' => 'tpl', + 'application/vnd.groove-vcard' => 'vcg', + 'application/vnd.hal+xml' => 'hal', + 'application/vnd.handheld-entertainment+xml' => 'zmm', + 'application/vnd.hbci' => 'hbci', + 'application/vnd.hhe.lesson-player' => 'les', + 'application/vnd.hp-hpgl' => 'hpgl', + 'application/vnd.hp-hpid' => 'hpid', + 'application/vnd.hp-hps' => 'hps', + 'application/vnd.hp-jlyt' => 'jlt', + 'application/vnd.hp-pcl' => 'pcl', + 'application/vnd.hp-pclxl' => 'pclxl', + 'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx', + 'application/vnd.ibm.minipay' => 'mpy', + 'application/vnd.ibm.modcap' => 'afp', + 'application/vnd.ibm.rights-management' => 'irm', + 'application/vnd.ibm.secure-container' => 'sc', + 'application/vnd.iccprofile' => 'icc', + 'application/vnd.igloader' => 'igl', + 'application/vnd.immervision-ivp' => 'ivp', + 'application/vnd.immervision-ivu' => 'ivu', + 'application/vnd.insors.igm' => 'igm', + 'application/vnd.intercon.formnet' => 'xpw', + 'application/vnd.intergeo' => 'i2g', + 'application/vnd.intu.qbo' => 'qbo', + 'application/vnd.intu.qfx' => 'qfx', + 'application/vnd.ipunplugged.rcprofile' => 'rcprofile', + 'application/vnd.irepository.package+xml' => 'irp', + 'application/vnd.is-xpr' => 'xpr', + 'application/vnd.isac.fcs' => 'fcs', + 'application/vnd.jam' => 'jam', + 'application/vnd.jcp.javame.midlet-rms' => 'rms', + 'application/vnd.jisp' => 'jisp', + 'application/vnd.joost.joda-archive' => 'joda', + 'application/vnd.kahootz' => 'ktz', + 'application/vnd.kde.karbon' => 'karbon', + 'application/vnd.kde.kchart' => 'chrt', + 'application/vnd.kde.kformula' => 'kfo', + 'application/vnd.kde.kivio' => 'flw', + 'application/vnd.kde.kontour' => 'kon', + 'application/vnd.kde.kpresenter' => 'kpr', + 'application/vnd.kde.kspread' => 'ksp', + 'application/vnd.kde.kword' => 'kwd', + 'application/vnd.kenameaapp' => 'htke', + 'application/vnd.kidspiration' => 'kia', + 'application/vnd.kinar' => 'kne', + 'application/vnd.koan' => 'skp', + 'application/vnd.kodak-descriptor' => 'sse', + 'application/vnd.las.las+xml' => 'lasxml', + 'application/vnd.llamagraphics.life-balance.desktop' => 'lbd', + 'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe', + 'application/vnd.lotus-1-2-3' => '123', + 'application/vnd.lotus-approach' => 'apr', + 'application/vnd.lotus-freelance' => 'pre', + 'application/vnd.lotus-notes' => 'nsf', + 'application/vnd.lotus-organizer' => 'org', + 'application/vnd.lotus-screencam' => 'scm', + 'application/vnd.lotus-wordpro' => 'lwp', + 'application/vnd.macports.portpkg' => 'portpkg', + 'application/vnd.mcd' => 'mcd', + 'application/vnd.medcalcdata' => 'mc1', + 'application/vnd.mediastation.cdkey' => 'cdkey', + 'application/vnd.mfer' => 'mwf', + 'application/vnd.mfmp' => 'mfm', + 'application/vnd.micrografx.flo' => 'flo', + 'application/vnd.micrografx.igx' => 'igx', + 'application/vnd.mif' => 'mif', + 'application/vnd.mobius.daf' => 'daf', + 'application/vnd.mobius.dis' => 'dis', + 'application/vnd.mobius.mbk' => 'mbk', + 'application/vnd.mobius.mqy' => 'mqy', + 'application/vnd.mobius.msl' => 'msl', + 'application/vnd.mobius.plc' => 'plc', + 'application/vnd.mobius.txf' => 'txf', + 'application/vnd.mophun.application' => 'mpn', + 'application/vnd.mophun.certificate' => 'mpc', + 'application/vnd.mozilla.xul+xml' => 'xul', + 'application/vnd.ms-artgalry' => 'cil', + 'application/vnd.ms-cab-compressed' => 'cab', + 'application/vnd.ms-excel' => 'xls', + 'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam', + 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb', + 'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm', + 'application/vnd.ms-excel.template.macroenabled.12' => 'xltm', + 'application/vnd.ms-fontobject' => 'eot', + 'application/vnd.ms-htmlhelp' => 'chm', + 'application/vnd.ms-ims' => 'ims', + 'application/vnd.ms-lrm' => 'lrm', + 'application/vnd.ms-officetheme' => 'thmx', + 'application/vnd.ms-pki.seccat' => 'cat', + 'application/vnd.ms-pki.stl' => 'stl', + 'application/vnd.ms-powerpoint' => 'ppt', + 'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam', + 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm', + 'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm', + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm', + 'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm', + 'application/vnd.ms-project' => 'mpp', + 'application/vnd.ms-word.document.macroenabled.12' => 'docm', + 'application/vnd.ms-word.template.macroenabled.12' => 'dotm', + 'application/vnd.ms-works' => 'wps', + 'application/vnd.ms-wpl' => 'wpl', + 'application/vnd.ms-xpsdocument' => 'xps', + 'application/vnd.mseq' => 'mseq', + 'application/vnd.musician' => 'mus', + 'application/vnd.muvee.style' => 'msty', + 'application/vnd.mynfc' => 'taglet', + 'application/vnd.neurolanguage.nlu' => 'nlu', + 'application/vnd.nitf' => 'ntf', + 'application/vnd.noblenet-directory' => 'nnd', + 'application/vnd.noblenet-sealer' => 'nns', + 'application/vnd.noblenet-web' => 'nnw', + 'application/vnd.nokia.n-gage.data' => 'ngdat', + 'application/vnd.nokia.n-gage.symbian.install' => 'n-gage', + 'application/vnd.nokia.radio-preset' => 'rpst', + 'application/vnd.nokia.radio-presets' => 'rpss', + 'application/vnd.novadigm.edm' => 'edm', + 'application/vnd.novadigm.edx' => 'edx', + 'application/vnd.novadigm.ext' => 'ext', + 'application/vnd.oasis.opendocument.chart' => 'odc', + 'application/vnd.oasis.opendocument.chart-template' => 'otc', + 'application/vnd.oasis.opendocument.database' => 'odb', + 'application/vnd.oasis.opendocument.formula' => 'odf', + 'application/vnd.oasis.opendocument.formula-template' => 'odft', + 'application/vnd.oasis.opendocument.graphics' => 'odg', + 'application/vnd.oasis.opendocument.graphics-template' => 'otg', + 'application/vnd.oasis.opendocument.image' => 'odi', + 'application/vnd.oasis.opendocument.image-template' => 'oti', + 'application/vnd.oasis.opendocument.presentation' => 'odp', + 'application/vnd.oasis.opendocument.presentation-template' => 'otp', + 'application/vnd.oasis.opendocument.spreadsheet' => 'ods', + 'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', + 'application/vnd.oasis.opendocument.text' => 'odt', + 'application/vnd.oasis.opendocument.text-master' => 'odm', + 'application/vnd.oasis.opendocument.text-template' => 'ott', + 'application/vnd.oasis.opendocument.text-web' => 'oth', + 'application/vnd.olpc-sugar' => 'xo', + 'application/vnd.oma.dd2+xml' => 'dd2', + 'application/vnd.openofficeorg.extension' => 'oxt', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx', + 'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx', + 'application/vnd.osgeo.mapguide.package' => 'mgp', + 'application/vnd.osgi.dp' => 'dp', + 'application/vnd.osgi.subsystem' => 'esa', + 'application/vnd.palm' => 'pdb', + 'application/vnd.pawaafile' => 'paw', + 'application/vnd.pg.format' => 'str', + 'application/vnd.pg.osasli' => 'ei6', + 'application/vnd.picsel' => 'efif', + 'application/vnd.pmi.widget' => 'wg', + 'application/vnd.pocketlearn' => 'plf', + 'application/vnd.powerbuilder6' => 'pbd', + 'application/vnd.previewsystems.box' => 'box', + 'application/vnd.proteus.magazine' => 'mgz', + 'application/vnd.publishare-delta-tree' => 'qps', + 'application/vnd.pvi.ptid1' => 'ptid', + 'application/vnd.quark.quarkxpress' => 'qxd', + 'application/vnd.realvnc.bed' => 'bed', + 'application/vnd.recordare.musicxml' => 'mxl', + 'application/vnd.recordare.musicxml+xml' => 'musicxml', + 'application/vnd.rig.cryptonote' => 'cryptonote', + 'application/vnd.rim.cod' => 'cod', + 'application/vnd.rn-realmedia' => 'rm', + 'application/vnd.rn-realmedia-vbr' => 'rmvb', + 'application/vnd.route66.link66+xml' => 'link66', + 'application/vnd.sailingtracker.track' => 'st', + 'application/vnd.seemail' => 'see', + 'application/vnd.sema' => 'sema', + 'application/vnd.semd' => 'semd', + 'application/vnd.semf' => 'semf', + 'application/vnd.shana.informed.formdata' => 'ifm', + 'application/vnd.shana.informed.formtemplate' => 'itp', + 'application/vnd.shana.informed.interchange' => 'iif', + 'application/vnd.shana.informed.package' => 'ipk', + 'application/vnd.simtech-mindmapper' => 'twd', + 'application/vnd.smaf' => 'mmf', + 'application/vnd.smart.teacher' => 'teacher', + 'application/vnd.solent.sdkm+xml' => 'sdkm', + 'application/vnd.spotfire.dxp' => 'dxp', + 'application/vnd.spotfire.sfs' => 'sfs', + 'application/vnd.stardivision.calc' => 'sdc', + 'application/vnd.stardivision.draw' => 'sda', + 'application/vnd.stardivision.impress' => 'sdd', + 'application/vnd.stardivision.math' => 'smf', + 'application/vnd.stardivision.writer' => 'sdw', + 'application/vnd.stardivision.writer-global' => 'sgl', + 'application/vnd.stepmania.package' => 'smzip', + 'application/vnd.stepmania.stepchart' => 'sm', + 'application/vnd.sun.xml.calc' => 'sxc', + 'application/vnd.sun.xml.calc.template' => 'stc', + 'application/vnd.sun.xml.draw' => 'sxd', + 'application/vnd.sun.xml.draw.template' => 'std', + 'application/vnd.sun.xml.impress' => 'sxi', + 'application/vnd.sun.xml.impress.template' => 'sti', + 'application/vnd.sun.xml.math' => 'sxm', + 'application/vnd.sun.xml.writer' => 'sxw', + 'application/vnd.sun.xml.writer.global' => 'sxg', + 'application/vnd.sun.xml.writer.template' => 'stw', + 'application/vnd.sus-calendar' => 'sus', + 'application/vnd.svd' => 'svd', + 'application/vnd.symbian.install' => 'sis', + 'application/vnd.syncml+xml' => 'xsm', + 'application/vnd.syncml.dm+wbxml' => 'bdm', + 'application/vnd.syncml.dm+xml' => 'xdm', + 'application/vnd.tao.intent-module-archive' => 'tao', + 'application/vnd.tcpdump.pcap' => 'pcap', + 'application/vnd.tmobile-livetv' => 'tmo', + 'application/vnd.trid.tpt' => 'tpt', + 'application/vnd.triscape.mxs' => 'mxs', + 'application/vnd.trueapp' => 'tra', + 'application/vnd.ufdl' => 'ufd', + 'application/vnd.uiq.theme' => 'utz', + 'application/vnd.umajin' => 'umj', + 'application/vnd.unity' => 'unityweb', + 'application/vnd.uoml+xml' => 'uoml', + 'application/vnd.vcx' => 'vcx', + 'application/vnd.visio' => 'vsd', + 'application/vnd.visionary' => 'vis', + 'application/vnd.vsf' => 'vsf', + 'application/vnd.wap.wbxml' => 'wbxml', + 'application/vnd.wap.wmlc' => 'wmlc', + 'application/vnd.wap.wmlscriptc' => 'wmlsc', + 'application/vnd.webturbo' => 'wtb', + 'application/vnd.wolfram.player' => 'nbp', + 'application/vnd.wordperfect' => 'wpd', + 'application/vnd.wqd' => 'wqd', + 'application/vnd.wt.stf' => 'stf', + 'application/vnd.xara' => 'xar', + 'application/vnd.xfdl' => 'xfdl', + 'application/vnd.yamaha.hv-dic' => 'hvd', + 'application/vnd.yamaha.hv-script' => 'hvs', + 'application/vnd.yamaha.hv-voice' => 'hvp', + 'application/vnd.yamaha.openscoreformat' => 'osf', + 'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 'osfpvg', + 'application/vnd.yamaha.smaf-audio' => 'saf', + 'application/vnd.yamaha.smaf-phrase' => 'spf', + 'application/vnd.yellowriver-custom-menu' => 'cmp', + 'application/vnd.zul' => 'zir', + 'application/vnd.zzazz.deck+xml' => 'zaz', + 'application/voicexml+xml' => 'vxml', + 'application/widget' => 'wgt', + 'application/winhlp' => 'hlp', + 'application/wsdl+xml' => 'wsdl', + 'application/wspolicy+xml' => 'wspolicy', + 'application/x-7z-compressed' => '7z', + 'application/x-abiword' => 'abw', + 'application/x-ace-compressed' => 'ace', + 'application/x-apple-diskimage' => 'dmg', + 'application/x-authorware-bin' => 'aab', + 'application/x-authorware-map' => 'aam', + 'application/x-authorware-seg' => 'aas', + 'application/x-bcpio' => 'bcpio', + 'application/x-bittorrent' => 'torrent', + 'application/x-blorb' => 'blb', + 'application/x-bzip' => 'bz', + 'application/x-bzip2' => 'bz2', + 'application/x-cbr' => 'cbr', + 'application/x-cdlink' => 'vcd', + 'application/x-cfs-compressed' => 'cfs', + 'application/x-chat' => 'chat', + 'application/x-chess-pgn' => 'pgn', + 'application/x-conference' => 'nsc', + 'application/x-cpio' => 'cpio', + 'application/x-csh' => 'csh', + 'application/x-debian-package' => 'deb', + 'application/x-dgc-compressed' => 'dgc', + 'application/x-director' => 'dir', + 'application/x-doom' => 'wad', + 'application/x-dtbncx+xml' => 'ncx', + 'application/x-dtbook+xml' => 'dtb', + 'application/x-dtbresource+xml' => 'res', + 'application/x-dvi' => 'dvi', + 'application/x-envoy' => 'evy', + 'application/x-eva' => 'eva', + 'application/x-font-bdf' => 'bdf', + 'application/x-font-ghostscript' => 'gsf', + 'application/x-font-linux-psf' => 'psf', + 'application/x-font-otf' => 'otf', + 'application/x-font-pcf' => 'pcf', + 'application/x-font-snf' => 'snf', + 'application/x-font-ttf' => 'ttf', + 'application/x-font-type1' => 'pfa', + 'application/x-font-woff' => 'woff', + 'application/x-freearc' => 'arc', + 'application/x-futuresplash' => 'spl', + 'application/x-gca-compressed' => 'gca', + 'application/x-glulx' => 'ulx', + 'application/x-gnumeric' => 'gnumeric', + 'application/x-gramps-xml' => 'gramps', + 'application/x-gtar' => 'gtar', + 'application/x-hdf' => 'hdf', + 'application/x-install-instructions' => 'install', + 'application/x-iso9660-image' => 'iso', + 'application/x-java-jnlp-file' => 'jnlp', + 'application/x-latex' => 'latex', + 'application/x-lzh-compressed' => 'lzh', + 'application/x-mie' => 'mie', + 'application/x-mobipocket-ebook' => 'prc', + 'application/x-ms-application' => 'application', + 'application/x-ms-shortcut' => 'lnk', + 'application/x-ms-wmd' => 'wmd', + 'application/x-ms-wmz' => 'wmz', + 'application/x-ms-xbap' => 'xbap', + 'application/x-msaccess' => 'mdb', + 'application/x-msbinder' => 'obd', + 'application/x-mscardfile' => 'crd', + 'application/x-msclip' => 'clp', + 'application/x-msdownload' => 'exe', + 'application/x-msmediaview' => 'mvb', + 'application/x-msmetafile' => 'wmf', + 'application/x-msmoney' => 'mny', + 'application/x-mspublisher' => 'pub', + 'application/x-msschedule' => 'scd', + 'application/x-msterminal' => 'trm', + 'application/x-mswrite' => 'wri', + 'application/x-netcdf' => 'nc', + 'application/x-nzb' => 'nzb', + 'application/x-pkcs12' => 'p12', + 'application/x-pkcs7-certificates' => 'p7b', + 'application/x-pkcs7-certreqresp' => 'p7r', + 'application/x-rar-compressed' => 'rar', + 'application/x-rar' => 'rar', + 'application/x-research-info-systems' => 'ris', + 'application/x-sh' => 'sh', + 'application/x-shar' => 'shar', + 'application/x-shockwave-flash' => 'swf', + 'application/x-silverlight-app' => 'xap', + 'application/x-sql' => 'sql', + 'application/x-stuffit' => 'sit', + 'application/x-stuffitx' => 'sitx', + 'application/x-subrip' => 'srt', + 'application/x-sv4cpio' => 'sv4cpio', + 'application/x-sv4crc' => 'sv4crc', + 'application/x-t3vm-image' => 't3', + 'application/x-tads' => 'gam', + 'application/x-tar' => 'tar', + 'application/x-tcl' => 'tcl', + 'application/x-tex' => 'tex', + 'application/x-tex-tfm' => 'tfm', + 'application/x-texinfo' => 'texinfo', + 'application/x-tgif' => 'obj', + 'application/x-ustar' => 'ustar', + 'application/x-wais-source' => 'src', + 'application/x-x509-ca-cert' => 'der', + 'application/x-xfig' => 'fig', + 'application/x-xliff+xml' => 'xlf', + 'application/x-xpinstall' => 'xpi', + 'application/x-xz' => 'xz', + 'application/x-zmachine' => 'z1', + 'application/xaml+xml' => 'xaml', + 'application/xcap-diff+xml' => 'xdf', + 'application/xenc+xml' => 'xenc', + 'application/xhtml+xml' => 'xhtml', + 'application/xml' => 'xml', + 'application/xml-dtd' => 'dtd', + 'application/xop+xml' => 'xop', + 'application/xproc+xml' => 'xpl', + 'application/xslt+xml' => 'xslt', + 'application/xspf+xml' => 'xspf', + 'application/xv+xml' => 'mxml', + 'application/yang' => 'yang', + 'application/yin+xml' => 'yin', + 'application/zip' => 'zip', + 'audio/adpcm' => 'adp', + 'audio/basic' => 'au', + 'audio/midi' => 'mid', + 'audio/mp3' => 'mp3', + 'audio/mp4' => 'mp4a', + 'audio/mpeg' => 'mpga', + 'audio/ogg' => 'oga', + 'audio/s3m' => 's3m', + 'audio/silk' => 'sil', + 'audio/vnd.dece.audio' => 'uva', + 'audio/vnd.digital-winds' => 'eol', + 'audio/vnd.dra' => 'dra', + 'audio/vnd.dts' => 'dts', + 'audio/vnd.dts.hd' => 'dtshd', + 'audio/vnd.lucent.voice' => 'lvp', + 'audio/vnd.ms-playready.media.pya' => 'pya', + 'audio/vnd.nuera.ecelp4800' => 'ecelp4800', + 'audio/vnd.nuera.ecelp7470' => 'ecelp7470', + 'audio/vnd.nuera.ecelp9600' => 'ecelp9600', + 'audio/vnd.rip' => 'rip', + 'audio/webm' => 'weba', + 'audio/x-aac' => 'aac', + 'audio/x-aiff' => 'aif', + 'audio/x-caf' => 'caf', + 'audio/x-flac' => 'flac', + 'audio/x-matroska' => 'mka', + 'audio/x-mpegurl' => 'm3u', + 'audio/x-ms-wax' => 'wax', + 'audio/x-ms-wma' => 'wma', + 'audio/x-pn-realaudio' => 'ram', + 'audio/x-pn-realaudio-plugin' => 'rmp', + 'audio/x-wav' => 'wav', + 'audio/xm' => 'xm', + 'chemical/x-cdx' => 'cdx', + 'chemical/x-cif' => 'cif', + 'chemical/x-cmdf' => 'cmdf', + 'chemical/x-cml' => 'cml', + 'chemical/x-csml' => 'csml', + 'chemical/x-xyz' => 'xyz', + 'image/bmp' => 'bmp', + 'image/x-ms-bmp' => 'bmp', + 'image/cgm' => 'cgm', + 'image/g3fax' => 'g3', + 'image/gif' => 'gif', + 'image/ief' => 'ief', + 'image/jpeg' => 'jpeg', + 'image/pjpeg' => 'jpeg', + 'image/ktx' => 'ktx', + 'image/png' => 'png', + 'image/prs.btif' => 'btif', + 'image/sgi' => 'sgi', + 'image/svg+xml' => 'svg', + 'image/tiff' => 'tiff', + 'image/vnd.adobe.photoshop' => 'psd', + 'image/vnd.dece.graphic' => 'uvi', + 'image/vnd.dvb.subtitle' => 'sub', + 'image/vnd.djvu' => 'djvu', + 'image/vnd.dwg' => 'dwg', + 'image/vnd.dxf' => 'dxf', + 'image/vnd.fastbidsheet' => 'fbs', + 'image/vnd.fpx' => 'fpx', + 'image/vnd.fst' => 'fst', + 'image/vnd.fujixerox.edmics-mmr' => 'mmr', + 'image/vnd.fujixerox.edmics-rlc' => 'rlc', + 'image/vnd.ms-modi' => 'mdi', + 'image/vnd.ms-photo' => 'wdp', + 'image/vnd.net-fpx' => 'npx', + 'image/vnd.wap.wbmp' => 'wbmp', + 'image/vnd.xiff' => 'xif', + 'image/webp' => 'webp', + 'image/x-3ds' => '3ds', + 'image/x-cmu-raster' => 'ras', + 'image/x-cmx' => 'cmx', + 'image/x-freehand' => 'fh', + 'image/x-icon' => 'ico', + 'image/x-mrsid-image' => 'sid', + 'image/x-pcx' => 'pcx', + 'image/x-pict' => 'pic', + 'image/x-portable-anymap' => 'pnm', + 'image/x-portable-bitmap' => 'pbm', + 'image/x-portable-graymap' => 'pgm', + 'image/x-portable-pixmap' => 'ppm', + 'image/x-rgb' => 'rgb', + 'image/x-tga' => 'tga', + 'image/x-xbitmap' => 'xbm', + 'image/x-xpixmap' => 'xpm', + 'image/x-xwindowdump' => 'xwd', + 'message/rfc822' => 'eml', + 'model/iges' => 'igs', + 'model/mesh' => 'msh', + 'model/vnd.collada+xml' => 'dae', + 'model/vnd.dwf' => 'dwf', + 'model/vnd.gdl' => 'gdl', + 'model/vnd.gtw' => 'gtw', + 'model/vnd.mts' => 'mts', + 'model/vnd.vtu' => 'vtu', + 'model/vrml' => 'wrl', + 'model/x3d+binary' => 'x3db', + 'model/x3d+vrml' => 'x3dv', + 'model/x3d+xml' => 'x3d', + 'text/cache-manifest' => 'appcache', + 'text/calendar' => 'ics', + 'text/css' => 'css', + 'text/csv' => 'csv', + 'text/html' => 'html', + 'text/n3' => 'n3', + 'text/plain' => 'txt', + 'text/prs.lines.tag' => 'dsc', + 'text/richtext' => 'rtx', + 'text/rtf' => 'rtf', + 'text/sgml' => 'sgml', + 'text/tab-separated-values' => 'tsv', + 'text/troff' => 't', + 'text/turtle' => 'ttl', + 'text/uri-list' => 'uri', + 'text/vcard' => 'vcard', + 'text/vnd.curl' => 'curl', + 'text/vnd.curl.dcurl' => 'dcurl', + 'text/vnd.curl.scurl' => 'scurl', + 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.dvb.subtitle' => 'sub', + 'text/vnd.fly' => 'fly', + 'text/vnd.fmi.flexstor' => 'flx', + 'text/vnd.graphviz' => 'gv', + 'text/vnd.in3d.3dml' => '3dml', + 'text/vnd.in3d.spot' => 'spot', + 'text/vnd.sun.j2me.app-descriptor' => 'jad', + 'text/vnd.wap.wml' => 'wml', + 'text/vnd.wap.wmlscript' => 'wmls', + 'text/x-asm' => 's', + 'text/x-c' => 'c', + 'text/x-fortran' => 'f', + 'text/x-pascal' => 'p', + 'text/x-java-source' => 'java', + 'text/x-opml' => 'opml', + 'text/x-nfo' => 'nfo', + 'text/x-setext' => 'etx', + 'text/x-sfv' => 'sfv', + 'text/x-uuencode' => 'uu', + 'text/x-vcalendar' => 'vcs', + 'text/x-vcard' => 'vcf', + 'video/3gpp' => '3gp', + 'video/3gpp2' => '3g2', + 'video/h261' => 'h261', + 'video/h263' => 'h263', + 'video/h264' => 'h264', + 'video/jpeg' => 'jpgv', + 'video/jpm' => 'jpm', + 'video/mj2' => 'mj2', + 'video/mp4' => 'mp4', + 'video/mpeg' => 'mpeg', + 'video/ogg' => 'ogv', + 'video/quicktime' => 'qt', + 'video/vnd.dece.hd' => 'uvh', + 'video/vnd.dece.mobile' => 'uvm', + 'video/vnd.dece.pd' => 'uvp', + 'video/vnd.dece.sd' => 'uvs', + 'video/vnd.dece.video' => 'uvv', + 'video/vnd.dvb.file' => 'dvb', + 'video/vnd.fvt' => 'fvt', + 'video/vnd.mpegurl' => 'mxu', + 'video/vnd.ms-playready.media.pyv' => 'pyv', + 'video/vnd.uvvu.mp4' => 'uvu', + 'video/vnd.vivo' => 'viv', + 'video/webm' => 'webm', + 'video/x-f4v' => 'f4v', + 'video/x-fli' => 'fli', + 'video/x-flv' => 'flv', + 'video/x-m4v' => 'm4v', + 'video/x-matroska' => 'mkv', + 'video/x-mng' => 'mng', + 'video/x-ms-asf' => 'asf', + 'video/x-ms-vob' => 'vob', + 'video/x-ms-wm' => 'wm', + 'video/x-ms-wmv' => 'wmv', + 'video/x-ms-wmx' => 'wmx', + 'video/x-ms-wvx' => 'wvx', + 'video/x-msvideo' => 'avi', + 'video/x-sgi-movie' => 'movie', + 'video/x-smv' => 'smv', + 'x-conference/x-cooltalk' => 'ice' + ]; + + /** + * Get extension by mime type + * + * @param string $mimeType + * @return string|null + */ + public function getExtension(string $mimeType) + { + return isset($this->mimeTypes[$mimeType])? $this->mimeTypes[$mimeType] : null; + } + + /** + * Get mime type by extension + * + * @param string $extension + * @return string|null + */ + public function getMimeType(string $extension) + { + $key = array_search($extension, $this->mimeTypes); + return $key ?: null; + } +} diff --git a/translates/es/src/MissingRequiredParameterException.php b/translates/es/src/MissingRequiredParameterException.php new file mode 100644 index 0000000..7568169 --- /dev/null +++ b/translates/es/src/MissingRequiredParameterException.php @@ -0,0 +1,7 @@ +validation = $validation; + } + + /** + * Set key + * + * @param string $key + * @return void + */ + public function setKey(string $key) + { + $this->key = $key; + } + + /** + * Get key + * + * @return string + */ + public function getKey() + { + return $this->key ?: get_class($this); + } + + /** + * Set attribute + * + * @param \Rakit\Validation\Attribute $attribute + * @return void + */ + public function setAttribute(Attribute $attribute) + { + $this->attribute = $attribute; + } + + /** + * Get attribute + * + * @return \Rakit\Validation\Attribute|null + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Get parameters + * + * @return array + */ + public function getParameters(): array + { + return $this->params; + } + + /** + * Set params + * + * @param array $params + * @return \Rakit\Validation\Rule + */ + public function setParameters(array $params): Rule + { + $this->params = array_merge($this->params, $params); + return $this; + } + + /** + * Set parameters + * + * @param string $key + * @param mixed $value + * @return \Rakit\Validation\Rule + */ + public function setParameter(string $key, $value): Rule + { + $this->params[$key] = $value; + return $this; + } + + /** + * Fill $params to $this->params + * + * @param array $params + * @return \Rakit\Validation\Rule + */ + public function fillParameters(array $params): Rule + { + foreach ($this->fillableParams as $key) { + if (empty($params)) { + break; + } + $this->params[$key] = array_shift($params); + } + return $this; + } + + /** + * Get parameter from given $key, return null if it not exists + * + * @param string $key + * @return mixed + */ + public function parameter(string $key) + { + return isset($this->params[$key])? $this->params[$key] : null; + } + + /** + * Set parameter text that can be displayed in error message using ':param_key' + * + * @param string $key + * @param string $text + * @return void + */ + public function setParameterText(string $key, string $text) + { + $this->paramsTexts[$key] = $text; + } + + /** + * Get $paramsTexts + * + * @return array + */ + public function getParametersTexts(): array + { + return $this->paramsTexts; + } + + /** + * Check whether this rule is implicit + * + * @return boolean + */ + public function isImplicit(): bool + { + return $this->implicit; + } + + /** + * Just alias of setMessage + * + * @param string $message + * @return \Rakit\Validation\Rule + */ + public function message(string $message): Rule + { + return $this->setMessage($message); + } + + /** + * Set message + * + * @param string $message + * @return \Rakit\Validation\Rule + */ + public function setMessage(string $message): Rule + { + $this->message = $message; + return $this; + } + + /** + * Get message + * + * @return string + */ + public function getMessage(): string + { + return $this->message; + } + + /** + * Check given $params must be exists + * + * @param array $params + * @return void + * @throws \Rakit\Validation\MissingRequiredParameterException + */ + protected function requireParameters(array $params) + { + foreach ($params as $param) { + if (!isset($this->params[$param])) { + $rule = $this->getKey(); + throw new MissingRequiredParameterException("Missing required parameter '{$param}' on rule '{$rule}'"); + } + } + } +} diff --git a/translates/es/src/RuleNotFoundException.php b/translates/es/src/RuleNotFoundException.php new file mode 100644 index 0000000..68d7eb3 --- /dev/null +++ b/translates/es/src/RuleNotFoundException.php @@ -0,0 +1,9 @@ +requireParameters($this->fillableParams); + $time = $this->parameter('time'); + + if (!$this->isValidDate($value)) { + throw $this->throwException($value); + } + + if (!$this->isValidDate($time)) { + throw $this->throwException($time); + } + + return $this->getTimeStamp($time) < $this->getTimeStamp($value); + } +} diff --git a/translates/es/src/Rules/Alpha.php b/translates/es/src/Rules/Alpha.php new file mode 100644 index 0000000..376fbb6 --- /dev/null +++ b/translates/es/src/Rules/Alpha.php @@ -0,0 +1,23 @@ + 0; + } +} diff --git a/translates/es/src/Rules/AlphaNum.php b/translates/es/src/Rules/AlphaNum.php new file mode 100644 index 0000000..7fb2b3b --- /dev/null +++ b/translates/es/src/Rules/AlphaNum.php @@ -0,0 +1,27 @@ + 0; + } +} diff --git a/translates/es/src/Rules/AlphaSpaces.php b/translates/es/src/Rules/AlphaSpaces.php new file mode 100644 index 0000000..20cee2a --- /dev/null +++ b/translates/es/src/Rules/AlphaSpaces.php @@ -0,0 +1,27 @@ + 0; + } +} diff --git a/translates/es/src/Rules/Before.php b/translates/es/src/Rules/Before.php new file mode 100644 index 0000000..e9d7c2c --- /dev/null +++ b/translates/es/src/Rules/Before.php @@ -0,0 +1,39 @@ +requireParameters($this->fillableParams); + $time = $this->parameter('time'); + + if (!$this->isValidDate($value)) { + throw $this->throwException($value); + } + + if (!$this->isValidDate($time)) { + throw $this->throwException($time); + } + + return $this->getTimeStamp($time) > $this->getTimeStamp($value); + } +} diff --git a/translates/es/src/Rules/Between.php b/translates/es/src/Rules/Between.php new file mode 100644 index 0000000..fa7de36 --- /dev/null +++ b/translates/es/src/Rules/Between.php @@ -0,0 +1,38 @@ +requireParameters($this->fillableParams); + + $min = $this->getBytesSize($this->parameter('min')); + $max = $this->getBytesSize($this->parameter('max')); + + $valueSize = $this->getValueSize($value); + + if (!is_numeric($valueSize)) { + return false; + } + + return ($valueSize >= $min && $valueSize <= $max); + } +} diff --git a/translates/es/src/Rules/Boolean.php b/translates/es/src/Rules/Boolean.php new file mode 100644 index 0000000..8c52e18 --- /dev/null +++ b/translates/es/src/Rules/Boolean.php @@ -0,0 +1,23 @@ +setParameter('callback', $callback); + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + * @throws \Exception + */ + public function check($value): bool + { + $this->requireParameters($this->fillableParams); + + $callback = $this->parameter('callback'); + if (false === $callback instanceof Closure) { + $key = $this->attribute->getKey(); + throw new InvalidArgumentException("Callback rule for '{$key}' is not callable."); + } + + $callback = $callback->bindTo($this); + $invalidMessage = $callback($value); + + if (is_string($invalidMessage)) { + $this->setMessage($invalidMessage); + return false; + } elseif (false === $invalidMessage) { + return false; + } + + return true; + } +} diff --git a/translates/es/src/Rules/Date.php b/translates/es/src/Rules/Date.php new file mode 100644 index 0000000..37c5b03 --- /dev/null +++ b/translates/es/src/Rules/Date.php @@ -0,0 +1,34 @@ + 'Y-m-d' + ]; + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters($this->fillableParams); + + $format = $this->parameter('format'); + return date_create_from_format($format, $value) !== false; + } +} diff --git a/translates/es/src/Rules/Defaults.php b/translates/es/src/Rules/Defaults.php new file mode 100644 index 0000000..b99f6cc --- /dev/null +++ b/translates/es/src/Rules/Defaults.php @@ -0,0 +1,50 @@ +requireParameters($this->fillableParams); + + $default = $this->parameter('default'); + return true; + } + + /** + * {@inheritDoc} + */ + public function modifyValue($value) + { + return $this->isEmptyValue($value) ? $this->parameter('default') : $value; + } + + /** + * Check $value is empty value + * + * @param mixed $value + * @return boolean + */ + protected function isEmptyValue($value): bool + { + $requiredValidator = new Required; + return false === $requiredValidator->check($value, []); + } +} diff --git a/translates/es/src/Rules/Different.php b/translates/es/src/Rules/Different.php new file mode 100644 index 0000000..3577318 --- /dev/null +++ b/translates/es/src/Rules/Different.php @@ -0,0 +1,31 @@ +requireParameters($this->fillableParams); + + $field = $this->parameter('field'); + $anotherValue = $this->validation->getValue($field); + + return $value != $anotherValue; + } +} diff --git a/translates/es/src/Rules/Digits.php b/translates/es/src/Rules/Digits.php new file mode 100644 index 0000000..87a5f65 --- /dev/null +++ b/translates/es/src/Rules/Digits.php @@ -0,0 +1,31 @@ +requireParameters($this->fillableParams); + + $length = (int) $this->parameter('length'); + + return ! preg_match('/[^0-9]/', $value) + && strlen((string) $value) == $length; + } +} diff --git a/translates/es/src/Rules/DigitsBetween.php b/translates/es/src/Rules/DigitsBetween.php new file mode 100644 index 0000000..539c09d --- /dev/null +++ b/translates/es/src/Rules/DigitsBetween.php @@ -0,0 +1,34 @@ +requireParameters($this->fillableParams); + + $min = (int) $this->parameter('min'); + $max = (int) $this->parameter('max'); + + $length = strlen((string) $value); + + return ! preg_match('/[^0-9]/', $value) + && $length >= $min && $length <= $max; + } +} diff --git a/translates/es/src/Rules/Email.php b/translates/es/src/Rules/Email.php new file mode 100644 index 0000000..a9bd236 --- /dev/null +++ b/translates/es/src/Rules/Email.php @@ -0,0 +1,23 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + if (count($params) == 1 && is_array($params[0])) { + $params = $params[0]; + } + $this->params['allowed_extensions'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['allowed_extensions']); + $allowedExtensions = $this->parameter('allowed_extensions'); + foreach ($allowedExtensions as $key => $ext) { + $allowedExtensions[$key] = ltrim($ext, '.'); + } + + $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $allowedExtensionsText = Helper::join(Helper::wraps($allowedExtensions, ".", ""), ', ', ", {$or} "); + $this->setParameterText('allowed_extensions', $allowedExtensionsText); + + $ext = strtolower(pathinfo($value, PATHINFO_EXTENSION)); + return ($ext && in_array($ext, $allowedExtensions)) ? true : false; + } +} diff --git a/translates/es/src/Rules/In.php b/translates/es/src/Rules/In.php new file mode 100644 index 0000000..1971ed5 --- /dev/null +++ b/translates/es/src/Rules/In.php @@ -0,0 +1,61 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + if (count($params) == 1 && is_array($params[0])) { + $params = $params[0]; + } + $this->params['allowed_values'] = $params; + return $this; + } + + /** + * Set strict value + * + * @param bool $strict + * @return void + */ + public function strict(bool $strict = true) + { + $this->strict = $strict; + } + + /** + * Check $value is existed + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['allowed_values']); + + $allowedValues = $this->parameter('allowed_values'); + + $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $allowedValuesText = Helper::join(Helper::wraps($allowedValues, "'"), ', ', ", {$or} "); + $this->setParameterText('allowed_values', $allowedValuesText); + + return in_array($value, $allowedValues, $this->strict); + } +} diff --git a/translates/es/src/Rules/Integer.php b/translates/es/src/Rules/Integer.php new file mode 100644 index 0000000..47aa702 --- /dev/null +++ b/translates/es/src/Rules/Integer.php @@ -0,0 +1,23 @@ +requireParameters($this->fillableParams); + + $max = $this->getBytesSize($this->parameter('max')); + $valueSize = $this->getValueSize($value); + + if (!is_numeric($valueSize)) { + return false; + } + + return $valueSize <= $max; + } +} diff --git a/translates/es/src/Rules/Mimes.php b/translates/es/src/Rules/Mimes.php new file mode 100644 index 0000000..9abb5a8 --- /dev/null +++ b/translates/es/src/Rules/Mimes.php @@ -0,0 +1,95 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->allowTypes($params); + return $this; + } + + /** + * Given $types and assign $this->params + * + * @param mixed $types + * @return self + */ + public function allowTypes($types): Rule + { + if (is_string($types)) { + $types = explode('|', $types); + } + + $this->params['allowed_types'] = $types; + + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $allowedTypes = $this->parameter('allowed_types'); + + if ($allowedTypes) { + $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); + } + + // below is Required rule job + if (!$this->isValueFromUploadedFiles($value) or $value['error'] == UPLOAD_ERR_NO_FILE) { + return true; + } + + if (!$this->isUploadedFile($value)) { + return false; + } + + // just make sure there is no error + if ($value['error']) { + return false; + } + + if (!empty($allowedTypes)) { + $guesser = new MimeTypeGuesser; + $ext = $guesser->getExtension($value['type']); + unset($guesser); + + if (!in_array($ext, $allowedTypes)) { + return false; + } + } + + return true; + } +} diff --git a/translates/es/src/Rules/Min.php b/translates/es/src/Rules/Min.php new file mode 100644 index 0000000..555f8d9 --- /dev/null +++ b/translates/es/src/Rules/Min.php @@ -0,0 +1,36 @@ +requireParameters($this->fillableParams); + + $min = $this->getBytesSize($this->parameter('min')); + $valueSize = $this->getValueSize($value); + + if (!is_numeric($valueSize)) { + return false; + } + + return $valueSize >= $min; + } +} diff --git a/translates/es/src/Rules/NotIn.php b/translates/es/src/Rules/NotIn.php new file mode 100644 index 0000000..f70275a --- /dev/null +++ b/translates/es/src/Rules/NotIn.php @@ -0,0 +1,61 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + if (count($params) == 1 and is_array($params[0])) { + $params = $params[0]; + } + $this->params['disallowed_values'] = $params; + return $this; + } + + /** + * Set strict value + * + * @param bool $strict + * @return void + */ + public function strict($strict = true) + { + $this->strict = $strict; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['disallowed_values']); + + $disallowedValues = (array) $this->parameter('disallowed_values'); + + $and = $this->validation ? $this->validation->getTranslation('and') : 'and'; + $disallowedValuesText = Helper::join(Helper::wraps($disallowedValues, "'"), ', ', ", {$and} "); + $this->setParameterText('disallowed_values', $disallowedValuesText); + + return !in_array($value, $disallowedValues, $this->strict); + } +} diff --git a/translates/es/src/Rules/Nullable.php b/translates/es/src/Rules/Nullable.php new file mode 100644 index 0000000..3a69a23 --- /dev/null +++ b/translates/es/src/Rules/Nullable.php @@ -0,0 +1,19 @@ +setAttributeAsRequired(); + + return $this->validation->hasValue($this->attribute->getKey()); + } + + /** + * Set attribute is required if $this->attribute is set + * + * @return void + */ + protected function setAttributeAsRequired() + { + if ($this->attribute) { + $this->attribute->setRequired(true); + } + } +} diff --git a/translates/es/src/Rules/Regex.php b/translates/es/src/Rules/Regex.php new file mode 100644 index 0000000..470944c --- /dev/null +++ b/translates/es/src/Rules/Regex.php @@ -0,0 +1,28 @@ +requireParameters($this->fillableParams); + $regex = $this->parameter('regex'); + return preg_match($regex, $value) > 0; + } +} diff --git a/translates/es/src/Rules/Required.php b/translates/es/src/Rules/Required.php new file mode 100644 index 0000000..543a794 --- /dev/null +++ b/translates/es/src/Rules/Required.php @@ -0,0 +1,51 @@ +setAttributeAsRequired(); + + if ($this->attribute and $this->attribute->hasRule('uploaded_file')) { + return $this->isValueFromUploadedFiles($value) and $value['error'] != UPLOAD_ERR_NO_FILE; + } + + if (is_string($value)) { + return mb_strlen(trim($value), 'UTF-8') > 0; + } + if (is_array($value)) { + return count($value) > 0; + } + return !is_null($value); + } + + /** + * Set attribute is required if $this->attribute is set + * + * @return void + */ + protected function setAttributeAsRequired() + { + if ($this->attribute) { + $this->attribute->setRequired(true); + } + } +} diff --git a/translates/es/src/Rules/RequiredIf.php b/translates/es/src/Rules/RequiredIf.php new file mode 100644 index 0000000..fb4eac4 --- /dev/null +++ b/translates/es/src/Rules/RequiredIf.php @@ -0,0 +1,52 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['field'] = array_shift($params); + $this->params['values'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['field', 'values']); + + $anotherAttribute = $this->parameter('field'); + $definedValues = $this->parameter('values'); + $anotherValue = $this->getAttribute()->getValue($anotherAttribute); + + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + if (in_array($anotherValue, $definedValues)) { + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } + + return true; + } +} diff --git a/translates/es/src/Rules/RequiredUnless.php b/translates/es/src/Rules/RequiredUnless.php new file mode 100644 index 0000000..dc1e3a1 --- /dev/null +++ b/translates/es/src/Rules/RequiredUnless.php @@ -0,0 +1,52 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['field'] = array_shift($params); + $this->params['values'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['field', 'values']); + + $anotherAttribute = $this->parameter('field'); + $definedValues = $this->parameter('values'); + $anotherValue = $this->getAttribute()->getValue($anotherAttribute); + + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + if (!in_array($anotherValue, $definedValues)) { + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } + + return true; + } +} diff --git a/translates/es/src/Rules/RequiredWith.php b/translates/es/src/Rules/RequiredWith.php new file mode 100644 index 0000000..5fd809c --- /dev/null +++ b/translates/es/src/Rules/RequiredWith.php @@ -0,0 +1,49 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['fields'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['fields']); + $fields = $this->parameter('fields'); + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + foreach ($fields as $field) { + if ($this->validation->hasValue($field)) { + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } + } + + return true; + } +} diff --git a/translates/es/src/Rules/RequiredWithAll.php b/translates/es/src/Rules/RequiredWithAll.php new file mode 100644 index 0000000..ba7ad59 --- /dev/null +++ b/translates/es/src/Rules/RequiredWithAll.php @@ -0,0 +1,49 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['fields'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['fields']); + $fields = $this->parameter('fields'); + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + foreach ($fields as $field) { + if (!$this->validation->hasValue($field)) { + return true; + } + } + + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } +} diff --git a/translates/es/src/Rules/RequiredWithout.php b/translates/es/src/Rules/RequiredWithout.php new file mode 100644 index 0000000..074fc0d --- /dev/null +++ b/translates/es/src/Rules/RequiredWithout.php @@ -0,0 +1,49 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['fields'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['fields']); + $fields = $this->parameter('fields'); + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + foreach ($fields as $field) { + if (!$this->validation->hasValue($field)) { + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } + } + + return true; + } +} diff --git a/translates/es/src/Rules/RequiredWithoutAll.php b/translates/es/src/Rules/RequiredWithoutAll.php new file mode 100644 index 0000000..53bac2c --- /dev/null +++ b/translates/es/src/Rules/RequiredWithoutAll.php @@ -0,0 +1,49 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->params['fields'] = $params; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $this->requireParameters(['fields']); + $fields = $this->parameter('fields'); + $validator = $this->validation->getValidator(); + $requiredValidator = $validator('required'); + + foreach ($fields as $field) { + if ($this->validation->hasValue($field)) { + return true; + } + } + + $this->setAttributeAsRequired(); + return $requiredValidator->check($value, []); + } +} diff --git a/translates/es/src/Rules/Same.php b/translates/es/src/Rules/Same.php new file mode 100644 index 0000000..b127b55 --- /dev/null +++ b/translates/es/src/Rules/Same.php @@ -0,0 +1,31 @@ +requireParameters($this->fillableParams); + + $field = $this->parameter('field'); + $anotherValue = $this->getAttribute()->getValue($field); + + return $value == $anotherValue; + } +} diff --git a/translates/es/src/Rules/Traits/DateUtilsTrait.php b/translates/es/src/Rules/Traits/DateUtilsTrait.php new file mode 100644 index 0000000..af33d71 --- /dev/null +++ b/translates/es/src/Rules/Traits/DateUtilsTrait.php @@ -0,0 +1,43 @@ +isValueFromUploadedFiles($value) && is_uploaded_file($value['tmp_name']); + } + + /** + * Resolve uploaded file value + * + * @param mixed $value + * @return array|null + */ + public function resolveUploadedFileValue($value) + { + if (!$this->isValueFromUploadedFiles($value)) { + return null; + } + + // Here $value should be an array: + // [ + // 'name' => string|array, + // 'type' => string|array, + // 'size' => int|array, + // 'tmp_name' => string|array, + // 'error' => string|array, + // ] + + // Flatten $value to it's array dot format, + // so our array must be something like: + // ['name' => string, 'type' => string, 'size' => int, ...] + // or for multiple values: + // ['name.0' => string, 'name.1' => string, 'type.0' => string, 'type.1' => string, ...] + // or for nested array: + // ['name.foo.bar' => string, 'name.foo.baz' => string, 'type.foo.bar' => string, 'type.foo.baz' => string, ...] + $arrayDots = Helper::arrayDot($value); + + $results = []; + foreach ($arrayDots as $key => $val) { + // Move first key to last key + // name.foo.bar -> foo.bar.name + $splits = explode(".", $key); + $firstKey = array_shift($splits); + $key = count($splits) ? implode(".", $splits) . ".{$firstKey}" : $firstKey; + + Helper::arraySet($results, $key, $val); + } + return $results; + } +} diff --git a/translates/es/src/Rules/Traits/SizeTrait.php b/translates/es/src/Rules/Traits/SizeTrait.php new file mode 100644 index 0000000..9ada7f5 --- /dev/null +++ b/translates/es/src/Rules/Traits/SizeTrait.php @@ -0,0 +1,109 @@ +getAttribute() + && ($this->getAttribute()->hasRule('numeric') || $this->getAttribute()->hasRule('integer')) + && is_numeric($value) + ) { + $value = (float) $value; + } + + if (is_int($value) || is_float($value)) { + return (float) $value; + } elseif (is_string($value)) { + return (float) mb_strlen($value, 'UTF-8'); + } elseif ($this->isUploadedFileValue($value)) { + return (float) $value['size']; + } elseif (is_array($value)) { + return (float) count($value); + } else { + return false; + } + } + + /** + * Given $size and get the bytes + * + * @param string|int $size + * @return float + * @throws InvalidArgumentException + */ + protected function getBytesSize($size) + { + if (is_numeric($size)) { + return (float) $size; + } + + if (!is_string($size)) { + throw new InvalidArgumentException("Size must be string or numeric Bytes", 1); + } + + if (!preg_match("/^(?((\d+)?\.)?\d+)(?(B|K|M|G|T|P)B?)?$/i", $size, $match)) { + throw new InvalidArgumentException("Size is not valid format", 1); + } + + $number = (float) $match['number']; + $format = isset($match['format']) ? $match['format'] : ''; + + switch (strtoupper($format)) { + case "KB": + case "K": + return $number * 1024; + + case "MB": + case "M": + return $number * pow(1024, 2); + + case "GB": + case "G": + return $number * pow(1024, 3); + + case "TB": + case "T": + return $number * pow(1024, 4); + + case "PB": + case "P": + return $number * pow(1024, 5); + + default: + return $number; + } + } + + /** + * Check whether value is from $_FILES + * + * @param mixed $value + * @return bool + */ + public function isUploadedFileValue($value): bool + { + if (!is_array($value)) { + return false; + } + + $keys = ['name', 'type', 'tmp_name', 'size', 'error']; + foreach ($keys as $key) { + if (!array_key_exists($key, $value)) { + return false; + } + } + + return true; + } +} diff --git a/translates/es/src/Rules/TypeArray.php b/translates/es/src/Rules/TypeArray.php new file mode 100644 index 0000000..311e5cc --- /dev/null +++ b/translates/es/src/Rules/TypeArray.php @@ -0,0 +1,23 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + $this->minSize(array_shift($params)); + $this->maxSize(array_shift($params)); + $this->fileTypes($params); + + return $this; + } + + /** + * Given $size and set the max size + * + * @param string|int $size + * @return self + */ + public function maxSize($size): Rule + { + $this->params['max_size'] = $size; + return $this; + } + + /** + * Given $size and set the min size + * + * @param string|int $size + * @return self + */ + public function minSize($size): Rule + { + $this->params['min_size'] = $size; + return $this; + } + + /** + * Given $min and $max then set the range size + * + * @param string|int $min + * @param string|int $max + * @return self + */ + public function sizeBetween($min, $max): Rule + { + $this->minSize($min); + $this->maxSize($max); + + return $this; + } + + /** + * Given $types and assign $this->params + * + * @param mixed $types + * @return self + */ + public function fileTypes($types): Rule + { + if (is_string($types)) { + $types = explode('|', $types); + } + + $this->params['allowed_types'] = $types; + + return $this; + } + + /** + * {@inheritDoc} + */ + public function beforeValidate() + { + $attribute = $this->getAttribute(); + + // We only resolve uploaded file value + // from complex attribute such as 'files.photo', 'images.*', 'images.foo.bar', etc. + if (!$attribute->isUsingDotNotation()) { + return; + } + + $keys = explode(".", $attribute->getKey()); + $firstKey = array_shift($keys); + $firstKeyValue = $this->validation->getValue($firstKey); + + $resolvedValue = $this->resolveUploadedFileValue($firstKeyValue); + + // Return original value if $value can't be resolved as uploaded file value + if (!$resolvedValue) { + return; + } + + $this->validation->setValue($firstKey, $resolvedValue); + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $minSize = $this->parameter('min_size'); + $maxSize = $this->parameter('max_size'); + $allowedTypes = $this->parameter('allowed_types'); + + if ($allowedTypes) { + $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); + } + + // below is Required rule job + if (!$this->isValueFromUploadedFiles($value) or $value['error'] == UPLOAD_ERR_NO_FILE) { + return true; + } + + if (!$this->isUploadedFile($value)) { + return false; + } + + // just make sure there is no error + if ($value['error']) { + return false; + } + + if ($minSize) { + $bytesMinSize = $this->getBytesSize($minSize); + if ($value['size'] < $bytesMinSize) { + $this->setMessage('The :attribute file is too small, minimum size is :min_size'); + return false; + } + } + + if ($maxSize) { + $bytesMaxSize = $this->getBytesSize($maxSize); + if ($value['size'] > $bytesMaxSize) { + $this->setMessage('The :attribute file is too large, maximum size is :max_size'); + return false; + } + } + + if (!empty($allowedTypes)) { + $guesser = new MimeTypeGuesser; + $ext = $guesser->getExtension($value['type']); + unset($guesser); + + if (!in_array($ext, $allowedTypes)) { + $this->setMessage('The :attribute file type must be :allowed_types'); + return false; + } + } + + return true; + } +} diff --git a/translates/es/src/Rules/Uppercase.php b/translates/es/src/Rules/Uppercase.php new file mode 100644 index 0000000..11300dd --- /dev/null +++ b/translates/es/src/Rules/Uppercase.php @@ -0,0 +1,23 @@ +params + * + * @param array $params + * @return self + */ + public function fillParameters(array $params): Rule + { + if (count($params) == 1 and is_array($params[0])) { + $params = $params[0]; + } + return $this->forScheme($params); + } + + /** + * Given $schemes and assign $this->params + * + * @param array $schemes + * @return self + */ + public function forScheme($schemes): Rule + { + $this->params['schemes'] = (array) $schemes; + return $this; + } + + /** + * Check the $value is valid + * + * @param mixed $value + * @return bool + */ + public function check($value): bool + { + $schemes = $this->parameter('schemes'); + + if (!$schemes) { + return $this->validateCommonScheme($value); + } else { + foreach ($schemes as $scheme) { + $method = 'validate' . ucfirst($scheme) .'Scheme'; + if (method_exists($this, $method)) { + if ($this->{$method}($value)) { + return true; + } + } elseif ($this->validateCommonScheme($value, $scheme)) { + return true; + } + } + + return false; + } + } + + /** + * Validate $value is valid URL format + * + * @param mixed $value + * @return bool + */ + public function validateBasic($value): bool + { + return filter_var($value, FILTER_VALIDATE_URL) !== false; + } + + /** + * Validate $value is correct $scheme format + * + * @param mixed $value + * @param null $scheme + * @return bool + */ + public function validateCommonScheme($value, $scheme = null): bool + { + if (!$scheme) { + return $this->validateBasic($value) && (bool) preg_match("/^\w+:\/\//i", $value); + } else { + return $this->validateBasic($value) && (bool) preg_match("/^{$scheme}:\/\//", $value); + } + } + + /** + * Validate the $value is mailto scheme format + * + * @param mixed $value + * @return bool + */ + public function validateMailtoScheme($value): bool + { + return $this->validateBasic($value) && preg_match("/^mailto:/", $value); + } + + /** + * Validate the $value is jdbc scheme format + * + * @param mixed $value + * @return bool + */ + public function validateJdbcScheme($value): bool + { + return (bool) preg_match("/^jdbc:\w+:\/\//", $value); + } +} diff --git a/translates/es/src/Traits/MessagesTrait.php b/translates/es/src/Traits/MessagesTrait.php new file mode 100644 index 0000000..14ed28e --- /dev/null +++ b/translates/es/src/Traits/MessagesTrait.php @@ -0,0 +1,54 @@ +messages[$key] = $message; + } + + /** + * Given $messages and set multiple messages + * + * @param array $messages + * @return void + */ + public function setMessages(array $messages) + { + $this->messages = array_merge($this->messages, $messages); + } + + /** + * Given message from given $key + * + * @param string $key + * @return string + */ + public function getMessage(string $key): string + { + return array_key_exists($key, $this->messages) ? $this->messages[$key] : $key; + } + + /** + * Get all $messages + * + * @return array + */ + public function getMessages(): array + { + return $this->messages; + } +} diff --git a/translates/es/src/Traits/TranslationsTrait.php b/translates/es/src/Traits/TranslationsTrait.php new file mode 100644 index 0000000..db935e7 --- /dev/null +++ b/translates/es/src/Traits/TranslationsTrait.php @@ -0,0 +1,54 @@ +translations[$key] = $translation; + } + + /** + * Given $translations and set multiple translations + * + * @param array $translations + * @return void + */ + public function setTranslations(array $translations) + { + $this->translations = array_merge($this->translations, $translations); + } + + /** + * Given translation from given $key + * + * @param string $key + * @return string + */ + public function getTranslation(string $key): string + { + return array_key_exists($key, $this->translations) ? $this->translations[$key] : $key; + } + + /** + * Get all $translations + * + * @return array + */ + public function getTranslations(): array + { + return $this->translations; + } +} diff --git a/translates/es/src/Validation.php b/translates/es/src/Validation.php new file mode 100644 index 0000000..d74786a --- /dev/null +++ b/translates/es/src/Validation.php @@ -0,0 +1,716 @@ +validator = $validator; + $this->inputs = $this->resolveInputAttributes($inputs); + $this->messages = $messages; + $this->errors = new ErrorBag; + foreach ($rules as $attributeKey => $rules) { + $this->addAttribute($attributeKey, $rules); + } + } + + /** + * Add attribute rules + * + * @param string $attributeKey + * @param string|array $rules + * @return void + */ + public function addAttribute(string $attributeKey, $rules) + { + $resolvedRules = $this->resolveRules($rules); + $attribute = new Attribute($this, $attributeKey, $this->getAlias($attributeKey), $resolvedRules); + $this->attributes[$attributeKey] = $attribute; + } + + /** + * Get attribute by key + * + * @param string $attributeKey + * @return null|\Rakit\Validation\Attribute + */ + public function getAttribute(string $attributeKey) + { + return isset($this->attributes[$attributeKey])? $this->attributes[$attributeKey] : null; + } + + /** + * Run validation + * + * @param array $inputs + * @return void + */ + public function validate(array $inputs = []) + { + $this->errors = new ErrorBag; // reset error bag + $this->inputs = array_merge($this->inputs, $this->resolveInputAttributes($inputs)); + + // Before validation hooks + foreach ($this->attributes as $attributeKey => $attribute) { + foreach ($attribute->getRules() as $rule) { + if ($rule instanceof BeforeValidate) { + $rule->beforeValidate(); + } + } + } + + foreach ($this->attributes as $attributeKey => $attribute) { + $this->validateAttribute($attribute); + } + } + + /** + * Get ErrorBag instance + * + * @return \Rakit\Validation\ErrorBag + */ + public function errors(): ErrorBag + { + return $this->errors; + } + + /** + * Validate attribute + * + * @param \Rakit\Validation\Attribute $attribute + * @return void + */ + protected function validateAttribute(Attribute $attribute) + { + if ($this->isArrayAttribute($attribute)) { + $attributes = $this->parseArrayAttribute($attribute); + foreach ($attributes as $i => $attr) { + $this->validateAttribute($attr); + } + return; + } + + $attributeKey = $attribute->getKey(); + $rules = $attribute->getRules(); + + $value = $this->getValue($attributeKey); + $isEmptyValue = $this->isEmptyValue($value); + + if ($attribute->hasRule('nullable') && $isEmptyValue) { + $rules = []; + } + + $isValid = true; + foreach ($rules as $ruleValidator) { + $ruleValidator->setAttribute($attribute); + + if ($ruleValidator instanceof ModifyValue) { + $value = $ruleValidator->modifyValue($value); + $isEmptyValue = $this->isEmptyValue($value); + } + + $valid = $ruleValidator->check($value); + + if ($isEmptyValue and $this->ruleIsOptional($attribute, $ruleValidator)) { + continue; + } + + if (!$valid) { + $isValid = false; + $this->addError($attribute, $value, $ruleValidator); + if ($ruleValidator->isImplicit()) { + break; + } + } + } + + if ($isValid) { + $this->setValidData($attribute, $value); + } else { + $this->setInvalidData($attribute, $value); + } + } + + /** + * Check whether given $attribute is array attribute + * + * @param \Rakit\Validation\Attribute $attribute + * @return bool + */ + protected function isArrayAttribute(Attribute $attribute): bool + { + $key = $attribute->getKey(); + return strpos($key, '*') !== false; + } + + /** + * Parse array attribute into it's child attributes + * + * @param \Rakit\Validation\Attribute $attribute + * @return array + */ + protected function parseArrayAttribute(Attribute $attribute): array + { + $attributeKey = $attribute->getKey(); + $data = Helper::arrayDot($this->initializeAttributeOnData($attributeKey)); + + $pattern = str_replace('\*', '([^\.]+)', preg_quote($attributeKey)); + + $data = array_merge($data, $this->extractValuesForWildcards( + $data, + $attributeKey + )); + + $attributes = []; + + foreach ($data as $key => $value) { + if ((bool) preg_match('/^'.$pattern.'\z/', $key, $match)) { + $attr = new Attribute($this, $key, null, $attribute->getRules()); + $attr->setPrimaryAttribute($attribute); + $attr->setKeyIndexes(array_slice($match, 1)); + $attributes[] = $attr; + } + } + + // set other attributes to each attributes + foreach ($attributes as $i => $attr) { + $otherAttributes = $attributes; + unset($otherAttributes[$i]); + $attr->setOtherAttributes($otherAttributes); + } + + return $attributes; + } + + /** + * Gather a copy of the attribute data filled with any missing attributes. + * Adapted from: https://github.com/illuminate/validation/blob/v5.3.23/Validator.php#L334 + * + * @param string $attribute + * @return array + */ + protected function initializeAttributeOnData(string $attributeKey): array + { + $explicitPath = $this->getLeadingExplicitAttributePath($attributeKey); + + $data = $this->extractDataFromPath($explicitPath); + + $asteriskPos = strpos($attributeKey, '*'); + + if (false === $asteriskPos || $asteriskPos === (mb_strlen($attributeKey, 'UTF-8') - 1)) { + return $data; + } + + return Helper::arraySet($data, $attributeKey, null, true); + } + + /** + * Get all of the exact attribute values for a given wildcard attribute. + * Adapted from: https://github.com/illuminate/validation/blob/v5.3.23/Validator.php#L354 + * + * @param array $data + * @param string $attributeKey + * @return array + */ + public function extractValuesForWildcards(array $data, string $attributeKey): array + { + $keys = []; + + $pattern = str_replace('\*', '[^\.]+', preg_quote($attributeKey)); + + foreach ($data as $key => $value) { + if ((bool) preg_match('/^'.$pattern.'/', $key, $matches)) { + $keys[] = $matches[0]; + } + } + + $keys = array_unique($keys); + + $data = []; + + foreach ($keys as $key) { + $data[$key] = Helper::arrayGet($this->inputs, $key); + } + + return $data; + } + + /** + * Get the explicit part of the attribute name. + * Adapted from: https://github.com/illuminate/validation/blob/v5.3.23/Validator.php#L2817 + * + * E.g. 'foo.bar.*.baz' -> 'foo.bar' + * + * Allows us to not spin through all of the flattened data for some operations. + * + * @param string $attributeKey + * @return string|null null when root wildcard + */ + protected function getLeadingExplicitAttributePath(string $attributeKey) + { + return rtrim(explode('*', $attributeKey)[0], '.') ?: null; + } + + /** + * Extract data based on the given dot-notated path. + * Adapted from: https://github.com/illuminate/validation/blob/v5.3.23/Validator.php#L2830 + * + * Used to extract a sub-section of the data for faster iteration. + * + * @param string|null $attributeKey + * @return array + */ + protected function extractDataFromPath($attributeKey): array + { + $results = []; + + $value = Helper::arrayGet($this->inputs, $attributeKey, '__missing__'); + + if ($value != '__missing__') { + Helper::arraySet($results, $attributeKey, $value); + } + + return $results; + } + + /** + * Add error to the $this->errors + * + * @param \Rakit\Validation\Attribute $attribute + * @param mixed $value + * @param \Rakit\Validation\Rule $ruleValidator + * @return void + */ + protected function addError(Attribute $attribute, $value, Rule $ruleValidator) + { + $ruleName = $ruleValidator->getKey(); + $message = $this->resolveMessage($attribute, $value, $ruleValidator); + + $this->errors->add($attribute->getKey(), $ruleName, $message); + } + + /** + * Check $value is empty value + * + * @param mixed $value + * @return boolean + */ + protected function isEmptyValue($value): bool + { + $requiredValidator = new Required; + return false === $requiredValidator->check($value, []); + } + + /** + * Check the rule is optional + * + * @param \Rakit\Validation\Attribute $attribute + * @param \Rakit\Validation\Rule $rule + * @return bool + */ + protected function ruleIsOptional(Attribute $attribute, Rule $rule): bool + { + return false === $attribute->isRequired() and + false === $rule->isImplicit() and + false === $rule instanceof Required; + } + + /** + * Resolve attribute name + * + * @param \Rakit\Validation\Attribute $attribute + * @return string + */ + protected function resolveAttributeName(Attribute $attribute): string + { + $primaryAttribute = $attribute->getPrimaryAttribute(); + if (isset($this->aliases[$attribute->getKey()])) { + return $this->aliases[$attribute->getKey()]; + } elseif ($primaryAttribute and isset($this->aliases[$primaryAttribute->getKey()])) { + return $this->aliases[$primaryAttribute->getKey()]; + } elseif ($this->validator->isUsingHumanizedKey()) { + return $attribute->getHumanizedKey(); + } else { + return $attribute->getKey(); + } + } + + /** + * Resolve message + * + * @param \Rakit\Validation\Attribute $attribute + * @param mixed $value + * @param \Rakit\Validation\Rule $validator + * @return mixed + */ + protected function resolveMessage(Attribute $attribute, $value, Rule $validator): string + { + $primaryAttribute = $attribute->getPrimaryAttribute(); + $params = array_merge($validator->getParameters(), $validator->getParametersTexts()); + $attributeKey = $attribute->getKey(); + $ruleKey = $validator->getKey(); + $alias = $attribute->getAlias() ?: $this->resolveAttributeName($attribute); + $message = $validator->getMessage(); // default rule message + $messageKeys = [ + $attributeKey.$this->messageSeparator.$ruleKey, + $attributeKey, + $ruleKey + ]; + + if ($primaryAttribute) { + // insert primaryAttribute keys + // $messageKeys = [ + // $attributeKey.$this->messageSeparator.$ruleKey, + // >> here [1] << + // $attributeKey, + // >> and here [3] << + // $ruleKey + // ]; + $primaryAttributeKey = $primaryAttribute->getKey(); + array_splice($messageKeys, 1, 0, $primaryAttributeKey.$this->messageSeparator.$ruleKey); + array_splice($messageKeys, 3, 0, $primaryAttributeKey); + } + + foreach ($messageKeys as $key) { + if (isset($this->messages[$key])) { + $message = $this->messages[$key]; + break; + } + } + + // Replace message params + $vars = array_merge($params, [ + 'attribute' => $alias, + 'value' => $value, + ]); + + foreach ($vars as $key => $value) { + $value = $this->stringify($value); + $message = str_replace(':'.$key, $value, $message); + } + + // Replace key indexes + $keyIndexes = $attribute->getKeyIndexes(); + foreach ($keyIndexes as $pathIndex => $index) { + $replacers = [ + "[{$pathIndex}]" => $index, + ]; + + if (is_numeric($index)) { + $replacers["{{$pathIndex}}"] = $index + 1; + } + + $message = str_replace(array_keys($replacers), array_values($replacers), $message); + } + + return $message; + } + + /** + * Stringify $value + * + * @param mixed $value + * @return string + */ + protected function stringify($value): string + { + if (is_string($value) || is_numeric($value)) { + return $value; + } elseif (is_array($value) || is_object($value)) { + return json_encode($value); + } else { + return ''; + } + } + + /** + * Resolve $rules + * + * @param mixed $rules + * @return array + */ + protected function resolveRules($rules): array + { + if (is_string($rules)) { + $rules = explode('|', $rules); + } + + $resolvedRules = []; + $validatorFactory = $this->getValidator(); + + foreach ($rules as $i => $rule) { + if (empty($rule)) { + continue; + } + $params = []; + + if (is_string($rule)) { + list($rulename, $params) = $this->parseRule($rule); + $validator = call_user_func_array($validatorFactory, array_merge([$rulename], $params)); + } elseif ($rule instanceof Rule) { + $validator = $rule; + } elseif ($rule instanceof Closure) { + $validator = call_user_func_array($validatorFactory, ['callback', $rule]); + } else { + $ruleName = is_object($rule) ? get_class($rule) : gettype($rule); + $message = "Rule must be a string, Closure or '".Rule::class."' instance. ".$ruleName." given"; + throw new \Exception(); + } + + $resolvedRules[] = $validator; + } + + return $resolvedRules; + } + + /** + * Parse $rule + * + * @param string $rule + * @return array + */ + protected function parseRule(string $rule): array + { + $exp = explode(':', $rule, 2); + $rulename = $exp[0]; + if ($rulename !== 'regex') { + $params = isset($exp[1])? explode(',', $exp[1]) : []; + } else { + $params = [$exp[1]]; + } + + return [$rulename, $params]; + } + + /** + * Given $attributeKey and $alias then assign alias + * + * @param mixed $attributeKey + * @param mixed $alias + * @return void + */ + public function setAlias(string $attributeKey, string $alias) + { + $this->aliases[$attributeKey] = $alias; + } + + /** + * Get attribute alias from given key + * + * @param mixed $attributeKey + * @return string|null + */ + public function getAlias(string $attributeKey) + { + return isset($this->aliases[$attributeKey])? $this->aliases[$attributeKey] : null; + } + + /** + * Set attributes aliases + * + * @param array $aliases + * @return void + */ + public function setAliases(array $aliases) + { + $this->aliases = array_merge($this->aliases, $aliases); + } + + /** + * Check validations are passed + * + * @return bool + */ + public function passes(): bool + { + return $this->errors->count() == 0; + } + + /** + * Check validations are failed + * + * @return bool + */ + public function fails(): bool + { + return !$this->passes(); + } + + /** + * Given $key and get value + * + * @param string $key + * @return mixed + */ + public function getValue(string $key) + { + return Helper::arrayGet($this->inputs, $key); + } + + /** + * Set input value + * + * @param string $key + * @param mixed $value + * @return void + */ + public function setValue(string $key, $value) + { + Helper::arraySet($this->inputs, $key, $value); + } + + /** + * Given $key and check value is exsited + * + * @param string $key + * @return boolean + */ + public function hasValue(string $key): bool + { + return Helper::arrayHas($this->inputs, $key); + } + + /** + * Get Validator class instance + * + * @return \Rakit\Validation\Validator + */ + public function getValidator(): Validator + { + return $this->validator; + } + + /** + * Given $inputs and resolve input attributes + * + * @param array $inputs + * @return array + */ + protected function resolveInputAttributes(array $inputs): array + { + $resolvedInputs = []; + foreach ($inputs as $key => $rules) { + $exp = explode(':', $key); + + if (count($exp) > 1) { + // set attribute alias + $this->aliases[$exp[0]] = $exp[1]; + } + + $resolvedInputs[$exp[0]] = $rules; + } + + return $resolvedInputs; + } + + /** + * Get validated data + * + * @return array + */ + public function getValidatedData(): array + { + return array_merge($this->validData, $this->invalidData); + } + + /** + * Set valid data + * + * @param \Rakit\Validation\Attribute $attribute + * @param mixed $value + * @return void + */ + protected function setValidData(Attribute $attribute, $value) + { + $key = $attribute->getKey(); + if ($attribute->isArrayAttribute() || $attribute->isUsingDotNotation()) { + Helper::arraySet($this->validData, $key, $value); + Helper::arrayUnset($this->invalidData, $key); + } else { + $this->validData[$key] = $value; + } + } + + /** + * Get valid data + * + * @return array + */ + public function getValidData(): array + { + return $this->validData; + } + + /** + * Set invalid data + * + * @param \Rakit\Validation\Attribute $attribute + * @param mixed $value + * @return void + */ + protected function setInvalidData(Attribute $attribute, $value) + { + $key = $attribute->getKey(); + if ($attribute->isArrayAttribute() || $attribute->isUsingDotNotation()) { + Helper::arraySet($this->invalidData, $key, $value); + Helper::arrayUnset($this->validData, $key); + } else { + $this->invalidData[$key] = $value; + } + } + + /** + * Get invalid data + * + * @return void + */ + public function getInvalidData(): array + { + return $this->invalidData; + } +} diff --git a/translates/es/src/Validator.php b/translates/es/src/Validator.php new file mode 100644 index 0000000..dfa19c5 --- /dev/null +++ b/translates/es/src/Validator.php @@ -0,0 +1,221 @@ +messages = $messages; + $this->registerBaseValidators(); + } + + /** + * Register or override existing validator + * + * @param mixed $key + * @param \Rakit\Validation\Rule $rule + * @return void + */ + public function setValidator(string $key, Rule $rule) + { + $this->validators[$key] = $rule; + $rule->setKey($key); + } + + /** + * Get validator object from given $key + * + * @param mixed $key + * @return mixed + */ + public function getValidator($key) + { + return isset($this->validators[$key]) ? $this->validators[$key] : null; + } + + /** + * Validate $inputs + * + * @param array $inputs + * @param array $rules + * @param array $messages + * @return Validation + */ + public function validate(array $inputs, array $rules, array $messages = []): Validation + { + $validation = $this->make($inputs, $rules, $messages); + $validation->validate(); + return $validation; + } + + /** + * Given $inputs, $rules and $messages to make the Validation class instance + * + * @param array $inputs + * @param array $rules + * @param array $messages + * @return Validation + */ + public function make(array $inputs, array $rules, array $messages = []): Validation + { + $messages = array_merge($this->messages, $messages); + $validation = new Validation($this, $inputs, $rules, $messages); + $validation->setTranslations($this->getTranslations()); + + return $validation; + } + + /** + * Magic invoke method to make Rule instance + * + * @param string $rule + * @return Rule + * @throws RuleNotFoundException + */ + public function __invoke(string $rule): Rule + { + $args = func_get_args(); + $rule = array_shift($args); + $params = $args; + $validator = $this->getValidator($rule); + if (!$validator) { + throw new RuleNotFoundException("Validator '{$rule}' is not registered", 1); + } + + $clonedValidator = clone $validator; + $clonedValidator->fillParameters($params); + + return $clonedValidator; + } + + /** + * Initialize base validators array + * + * @return void + */ + protected function registerBaseValidators() + { + $baseValidator = [ + 'required' => new Rules\Required, + 'required_if' => new Rules\RequiredIf, + 'required_unless' => new Rules\RequiredUnless, + 'required_with' => new Rules\RequiredWith, + 'required_without' => new Rules\RequiredWithout, + 'required_with_all' => new Rules\RequiredWithAll, + 'required_without_all' => new Rules\RequiredWithoutAll, + 'email' => new Rules\Email, + 'alpha' => new Rules\Alpha, + 'numeric' => new Rules\Numeric, + 'alpha_num' => new Rules\AlphaNum, + 'alpha_dash' => new Rules\AlphaDash, + 'alpha_spaces' => new Rules\AlphaSpaces, + 'in' => new Rules\In, + 'not_in' => new Rules\NotIn, + 'min' => new Rules\Min, + 'max' => new Rules\Max, + 'between' => new Rules\Between, + 'url' => new Rules\Url, + 'integer' => new Rules\Integer, + 'boolean' => new Rules\Boolean, + 'ip' => new Rules\Ip, + 'ipv4' => new Rules\Ipv4, + 'ipv6' => new Rules\Ipv6, + 'extension' => new Rules\Extension, + 'array' => new Rules\TypeArray, + 'same' => new Rules\Same, + 'regex' => new Rules\Regex, + 'date' => new Rules\Date, + 'accepted' => new Rules\Accepted, + 'present' => new Rules\Present, + 'different' => new Rules\Different, + 'uploaded_file' => new Rules\UploadedFile, + 'mimes' => new Rules\Mimes, + 'callback' => new Rules\Callback, + 'before' => new Rules\Before, + 'after' => new Rules\After, + 'lowercase' => new Rules\Lowercase, + 'uppercase' => new Rules\Uppercase, + 'json' => new Rules\Json, + 'digits' => new Rules\Digits, + 'digits_between' => new Rules\DigitsBetween, + 'defaults' => new Rules\Defaults, + 'default' => new Rules\Defaults, // alias of defaults + 'nullable' => new Rules\Nullable, + ]; + + foreach ($baseValidator as $key => $validator) { + $this->setValidator($key, $validator); + } + } + + /** + * Given $ruleName and $rule to add new validator + * + * @param string $ruleName + * @param \Rakit\Validation\Rule $rule + * @return void + */ + public function addValidator(string $ruleName, Rule $rule) + { + if (!$this->allowRuleOverride && array_key_exists($ruleName, $this->validators)) { + throw new RuleQuashException( + "You cannot override a built in rule. You have to rename your rule" + ); + } + + $this->setValidator($ruleName, $rule); + } + + /** + * Set rule can allow to be overrided + * + * @param boolean $status + * @return void + */ + public function allowRuleOverride(bool $status = false) + { + $this->allowRuleOverride = $status; + } + + /** + * Set this can use humanize keys + * + * @param boolean $useHumanizedKeys + * @return void + */ + public function setUseHumanizedKeys(bool $useHumanizedKeys = true) + { + $this->useHumanizedKeys = $useHumanizedKeys; + } + + /** + * Get $this->useHumanizedKeys value + * + * @return void + */ + public function isUsingHumanizedKey(): bool + { + return $this->useHumanizedKeys; + } +} From 946f45290cf2f8bf49f97b9e3ebb879fba61f562 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 18:11:54 -0300 Subject: [PATCH 2/7] ES --- translates/{es => es_(v1.4)}/src/Attribute.php | 0 translates/{es => es_(v1.4)}/src/ErrorBag.php | 0 translates/{es => es_(v1.4)}/src/Helper.php | 0 translates/{es => es_(v1.4)}/src/MimeTypeGuesser.php | 0 .../src/MissingRequiredParameterException.php | 0 translates/{es => es_(v1.4)}/src/Rule.php | 0 translates/{es => es_(v1.4)}/src/RuleNotFoundException.php | 0 translates/{es => es_(v1.4)}/src/RuleQuashException.php | 0 translates/{es => es_(v1.4)}/src/Rules/Accepted.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/After.php | 3 +-- translates/{es => es_(v1.4)}/src/Rules/Alpha.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/AlphaDash.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/AlphaNum.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/AlphaSpaces.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/Before.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/Between.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/Boolean.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/Callback.php | 4 ++-- translates/{es => es_(v1.4)}/src/Rules/Date.php | 2 +- translates/{es => es_(v1.4)}/src/Rules/Defaults.php | 0 translates/{es => es_(v1.4)}/src/Rules/Different.php | 0 translates/{es => es_(v1.4)}/src/Rules/Digits.php | 0 translates/{es => es_(v1.4)}/src/Rules/DigitsBetween.php | 0 translates/{es => es_(v1.4)}/src/Rules/Email.php | 0 translates/{es => es_(v1.4)}/src/Rules/Extension.php | 0 translates/{es => es_(v1.4)}/src/Rules/In.php | 0 translates/{es => es_(v1.4)}/src/Rules/Integer.php | 0 .../{es => es_(v1.4)}/src/Rules/Interfaces/BeforeValidate.php | 0 .../{es => es_(v1.4)}/src/Rules/Interfaces/ModifyValue.php | 0 translates/{es => es_(v1.4)}/src/Rules/Ip.php | 0 translates/{es => es_(v1.4)}/src/Rules/Ipv4.php | 0 translates/{es => es_(v1.4)}/src/Rules/Ipv6.php | 0 translates/{es => es_(v1.4)}/src/Rules/Json.php | 0 translates/{es => es_(v1.4)}/src/Rules/Lowercase.php | 0 translates/{es => es_(v1.4)}/src/Rules/Max.php | 0 translates/{es => es_(v1.4)}/src/Rules/Mimes.php | 0 translates/{es => es_(v1.4)}/src/Rules/Min.php | 0 translates/{es => es_(v1.4)}/src/Rules/NotIn.php | 0 translates/{es => es_(v1.4)}/src/Rules/Nullable.php | 0 translates/{es => es_(v1.4)}/src/Rules/Numeric.php | 0 translates/{es => es_(v1.4)}/src/Rules/Present.php | 0 translates/{es => es_(v1.4)}/src/Rules/Regex.php | 0 translates/{es => es_(v1.4)}/src/Rules/Required.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredIf.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredUnless.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredWith.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredWithAll.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredWithout.php | 0 translates/{es => es_(v1.4)}/src/Rules/RequiredWithoutAll.php | 0 translates/{es => es_(v1.4)}/src/Rules/Same.php | 0 .../{es => es_(v1.4)}/src/Rules/Traits/DateUtilsTrait.php | 0 translates/{es => es_(v1.4)}/src/Rules/Traits/FileTrait.php | 0 translates/{es => es_(v1.4)}/src/Rules/Traits/SizeTrait.php | 0 translates/{es => es_(v1.4)}/src/Rules/TypeArray.php | 0 translates/{es => es_(v1.4)}/src/Rules/UploadedFile.php | 0 translates/{es => es_(v1.4)}/src/Rules/Uppercase.php | 0 translates/{es => es_(v1.4)}/src/Rules/Url.php | 0 translates/{es => es_(v1.4)}/src/Traits/MessagesTrait.php | 0 translates/{es => es_(v1.4)}/src/Traits/TranslationsTrait.php | 0 translates/{es => es_(v1.4)}/src/Validation.php | 0 translates/{es => es_(v1.4)}/src/Validator.php | 0 61 files changed, 12 insertions(+), 13 deletions(-) rename translates/{es => es_(v1.4)}/src/Attribute.php (100%) rename translates/{es => es_(v1.4)}/src/ErrorBag.php (100%) rename translates/{es => es_(v1.4)}/src/Helper.php (100%) rename translates/{es => es_(v1.4)}/src/MimeTypeGuesser.php (100%) rename translates/{es => es_(v1.4)}/src/MissingRequiredParameterException.php (100%) rename translates/{es => es_(v1.4)}/src/Rule.php (100%) rename translates/{es => es_(v1.4)}/src/RuleNotFoundException.php (100%) rename translates/{es => es_(v1.4)}/src/RuleQuashException.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Accepted.php (88%) rename translates/{es => es_(v1.4)}/src/Rules/After.php (90%) rename translates/{es => es_(v1.4)}/src/Rules/Alpha.php (82%) rename translates/{es => es_(v1.4)}/src/Rules/AlphaDash.php (85%) rename translates/{es => es_(v1.4)}/src/Rules/AlphaNum.php (84%) rename translates/{es => es_(v1.4)}/src/Rules/AlphaSpaces.php (82%) rename translates/{es => es_(v1.4)}/src/Rules/Before.php (91%) rename translates/{es => es_(v1.4)}/src/Rules/Between.php (91%) rename translates/{es => es_(v1.4)}/src/Rules/Boolean.php (86%) rename translates/{es => es_(v1.4)}/src/Rules/Callback.php (88%) rename translates/{es => es_(v1.4)}/src/Rules/Date.php (89%) rename translates/{es => es_(v1.4)}/src/Rules/Defaults.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Different.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Digits.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/DigitsBetween.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Email.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Extension.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/In.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Integer.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Interfaces/BeforeValidate.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Interfaces/ModifyValue.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Ip.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Ipv4.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Ipv6.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Json.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Lowercase.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Max.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Mimes.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Min.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/NotIn.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Nullable.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Numeric.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Present.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Regex.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Required.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredIf.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredUnless.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredWith.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredWithAll.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredWithout.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/RequiredWithoutAll.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Same.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Traits/DateUtilsTrait.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Traits/FileTrait.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Traits/SizeTrait.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/TypeArray.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/UploadedFile.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Uppercase.php (100%) rename translates/{es => es_(v1.4)}/src/Rules/Url.php (100%) rename translates/{es => es_(v1.4)}/src/Traits/MessagesTrait.php (100%) rename translates/{es => es_(v1.4)}/src/Traits/TranslationsTrait.php (100%) rename translates/{es => es_(v1.4)}/src/Validation.php (100%) rename translates/{es => es_(v1.4)}/src/Validator.php (100%) diff --git a/translates/es/src/Attribute.php b/translates/es_(v1.4)/src/Attribute.php similarity index 100% rename from translates/es/src/Attribute.php rename to translates/es_(v1.4)/src/Attribute.php diff --git a/translates/es/src/ErrorBag.php b/translates/es_(v1.4)/src/ErrorBag.php similarity index 100% rename from translates/es/src/ErrorBag.php rename to translates/es_(v1.4)/src/ErrorBag.php diff --git a/translates/es/src/Helper.php b/translates/es_(v1.4)/src/Helper.php similarity index 100% rename from translates/es/src/Helper.php rename to translates/es_(v1.4)/src/Helper.php diff --git a/translates/es/src/MimeTypeGuesser.php b/translates/es_(v1.4)/src/MimeTypeGuesser.php similarity index 100% rename from translates/es/src/MimeTypeGuesser.php rename to translates/es_(v1.4)/src/MimeTypeGuesser.php diff --git a/translates/es/src/MissingRequiredParameterException.php b/translates/es_(v1.4)/src/MissingRequiredParameterException.php similarity index 100% rename from translates/es/src/MissingRequiredParameterException.php rename to translates/es_(v1.4)/src/MissingRequiredParameterException.php diff --git a/translates/es/src/Rule.php b/translates/es_(v1.4)/src/Rule.php similarity index 100% rename from translates/es/src/Rule.php rename to translates/es_(v1.4)/src/Rule.php diff --git a/translates/es/src/RuleNotFoundException.php b/translates/es_(v1.4)/src/RuleNotFoundException.php similarity index 100% rename from translates/es/src/RuleNotFoundException.php rename to translates/es_(v1.4)/src/RuleNotFoundException.php diff --git a/translates/es/src/RuleQuashException.php b/translates/es_(v1.4)/src/RuleQuashException.php similarity index 100% rename from translates/es/src/RuleQuashException.php rename to translates/es_(v1.4)/src/RuleQuashException.php diff --git a/translates/es/src/Rules/Accepted.php b/translates/es_(v1.4)/src/Rules/Accepted.php similarity index 88% rename from translates/es/src/Rules/Accepted.php rename to translates/es_(v1.4)/src/Rules/Accepted.php index 6f4655b..394387b 100644 --- a/translates/es/src/Rules/Accepted.php +++ b/translates/es_(v1.4)/src/Rules/Accepted.php @@ -10,7 +10,7 @@ class Accepted extends Rule protected $implicit = true; /** @var string */ - protected $message = "The :attribute must be accepted"; + protected $message = ":attribute debe ser aceptado."; /** * Check the $value is accepted diff --git a/translates/es/src/Rules/After.php b/translates/es_(v1.4)/src/Rules/After.php similarity index 90% rename from translates/es/src/Rules/After.php rename to translates/es_(v1.4)/src/Rules/After.php index 7207747..a1d1e0f 100644 --- a/translates/es/src/Rules/After.php +++ b/translates/es_(v1.4)/src/Rules/After.php @@ -6,11 +6,10 @@ class After extends Rule { - use Traits\DateUtilsTrait; /** @var string */ - protected $message = "The :attribute must be a date after :time."; + protected $message = ":attribute debe ser una fecha posterior a :time."; /** @var array */ protected $fillableParams = ['time']; diff --git a/translates/es/src/Rules/Alpha.php b/translates/es_(v1.4)/src/Rules/Alpha.php similarity index 82% rename from translates/es/src/Rules/Alpha.php rename to translates/es_(v1.4)/src/Rules/Alpha.php index 376fbb6..503d648 100644 --- a/translates/es/src/Rules/Alpha.php +++ b/translates/es_(v1.4)/src/Rules/Alpha.php @@ -8,7 +8,7 @@ class Alpha extends Rule { /** @var string */ - protected $message = "The :attribute only allows alphabet characters"; + protected $message = ":attribute solo permite caracteres alfabéticos."; /** * Check the $value is valid diff --git a/translates/es/src/Rules/AlphaDash.php b/translates/es_(v1.4)/src/Rules/AlphaDash.php similarity index 85% rename from translates/es/src/Rules/AlphaDash.php rename to translates/es_(v1.4)/src/Rules/AlphaDash.php index 7813f5b..eb70afd 100644 --- a/translates/es/src/Rules/AlphaDash.php +++ b/translates/es_(v1.4)/src/Rules/AlphaDash.php @@ -8,7 +8,7 @@ class AlphaDash extends Rule { /** @var string */ - protected $message = "The :attribute only allows a-z, 0-9, _ and -"; + protected $message = ":attribute solo permite a-z, 0-9, _ y -."; /** * Check the $value is valid diff --git a/translates/es/src/Rules/AlphaNum.php b/translates/es_(v1.4)/src/Rules/AlphaNum.php similarity index 84% rename from translates/es/src/Rules/AlphaNum.php rename to translates/es_(v1.4)/src/Rules/AlphaNum.php index 7fb2b3b..4b63a4b 100644 --- a/translates/es/src/Rules/AlphaNum.php +++ b/translates/es_(v1.4)/src/Rules/AlphaNum.php @@ -8,7 +8,7 @@ class AlphaNum extends Rule { /** @var string */ - protected $message = "The :attribute only allows alphabet and numeric"; + protected $message = ":attribute solo permite caracteres alfanuméricos."; /** * Check the $value is valid diff --git a/translates/es/src/Rules/AlphaSpaces.php b/translates/es_(v1.4)/src/Rules/AlphaSpaces.php similarity index 82% rename from translates/es/src/Rules/AlphaSpaces.php rename to translates/es_(v1.4)/src/Rules/AlphaSpaces.php index 20cee2a..486b494 100644 --- a/translates/es/src/Rules/AlphaSpaces.php +++ b/translates/es_(v1.4)/src/Rules/AlphaSpaces.php @@ -8,7 +8,7 @@ class AlphaSpaces extends Rule { /** @var string */ - protected $message = "The :attribute may only allows alphabet and spaces"; + protected $message = ":attribute solo permite caracteres alfabéticos y espacios."; /** * Check the $value is valid diff --git a/translates/es/src/Rules/Before.php b/translates/es_(v1.4)/src/Rules/Before.php similarity index 91% rename from translates/es/src/Rules/Before.php rename to translates/es_(v1.4)/src/Rules/Before.php index e9d7c2c..68bb7d0 100644 --- a/translates/es/src/Rules/Before.php +++ b/translates/es_(v1.4)/src/Rules/Before.php @@ -9,7 +9,7 @@ class Before extends Rule use Traits\DateUtilsTrait; /** @var string */ - protected $message = "The :attribute must be a date before :time."; + protected $message = ":attribute debe ser una fecha anterior a :time."; /** @var array */ protected $fillableParams = ['time']; diff --git a/translates/es/src/Rules/Between.php b/translates/es_(v1.4)/src/Rules/Between.php similarity index 91% rename from translates/es/src/Rules/Between.php rename to translates/es_(v1.4)/src/Rules/Between.php index fa7de36..d9bfab0 100644 --- a/translates/es/src/Rules/Between.php +++ b/translates/es_(v1.4)/src/Rules/Between.php @@ -9,7 +9,7 @@ class Between extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = "The :attribute must be between :min and :max"; + protected $message = ":attribute debe estar entre :min y :max."; /** @var array */ protected $fillableParams = ['min', 'max']; diff --git a/translates/es/src/Rules/Boolean.php b/translates/es_(v1.4)/src/Rules/Boolean.php similarity index 86% rename from translates/es/src/Rules/Boolean.php rename to translates/es_(v1.4)/src/Rules/Boolean.php index 8c52e18..6b31d24 100644 --- a/translates/es/src/Rules/Boolean.php +++ b/translates/es_(v1.4)/src/Rules/Boolean.php @@ -7,7 +7,7 @@ class Boolean extends Rule { /** @var string */ - protected $message = "The :attribute must be a boolean"; + protected $message = ":attribute debe ser un booleano."; /** * Check the value is valid diff --git a/translates/es/src/Rules/Callback.php b/translates/es_(v1.4)/src/Rules/Callback.php similarity index 88% rename from translates/es/src/Rules/Callback.php rename to translates/es_(v1.4)/src/Rules/Callback.php index 58d161c..18f64f6 100644 --- a/translates/es/src/Rules/Callback.php +++ b/translates/es_(v1.4)/src/Rules/Callback.php @@ -10,7 +10,7 @@ class Callback extends Rule { /** @var string */ - protected $message = "The :attribute is not valid"; + protected $message = ":attribute no es válido."; /** @var array */ protected $fillableParams = ['callback']; @@ -40,7 +40,7 @@ public function check($value): bool $callback = $this->parameter('callback'); if (false === $callback instanceof Closure) { $key = $this->attribute->getKey(); - throw new InvalidArgumentException("Callback rule for '{$key}' is not callable."); + throw new InvalidArgumentException("Callback rule para '{$key}' no se puede llamar."); } $callback = $callback->bindTo($this); diff --git a/translates/es/src/Rules/Date.php b/translates/es_(v1.4)/src/Rules/Date.php similarity index 89% rename from translates/es/src/Rules/Date.php rename to translates/es_(v1.4)/src/Rules/Date.php index 37c5b03..b371ae5 100644 --- a/translates/es/src/Rules/Date.php +++ b/translates/es_(v1.4)/src/Rules/Date.php @@ -8,7 +8,7 @@ class Date extends Rule { /** @var string */ - protected $message = "The :attribute is not valid date format"; + protected $message = ":attribute no es un formato de fecha válido."; /** @var array */ protected $fillableParams = ['format']; diff --git a/translates/es/src/Rules/Defaults.php b/translates/es_(v1.4)/src/Rules/Defaults.php similarity index 100% rename from translates/es/src/Rules/Defaults.php rename to translates/es_(v1.4)/src/Rules/Defaults.php diff --git a/translates/es/src/Rules/Different.php b/translates/es_(v1.4)/src/Rules/Different.php similarity index 100% rename from translates/es/src/Rules/Different.php rename to translates/es_(v1.4)/src/Rules/Different.php diff --git a/translates/es/src/Rules/Digits.php b/translates/es_(v1.4)/src/Rules/Digits.php similarity index 100% rename from translates/es/src/Rules/Digits.php rename to translates/es_(v1.4)/src/Rules/Digits.php diff --git a/translates/es/src/Rules/DigitsBetween.php b/translates/es_(v1.4)/src/Rules/DigitsBetween.php similarity index 100% rename from translates/es/src/Rules/DigitsBetween.php rename to translates/es_(v1.4)/src/Rules/DigitsBetween.php diff --git a/translates/es/src/Rules/Email.php b/translates/es_(v1.4)/src/Rules/Email.php similarity index 100% rename from translates/es/src/Rules/Email.php rename to translates/es_(v1.4)/src/Rules/Email.php diff --git a/translates/es/src/Rules/Extension.php b/translates/es_(v1.4)/src/Rules/Extension.php similarity index 100% rename from translates/es/src/Rules/Extension.php rename to translates/es_(v1.4)/src/Rules/Extension.php diff --git a/translates/es/src/Rules/In.php b/translates/es_(v1.4)/src/Rules/In.php similarity index 100% rename from translates/es/src/Rules/In.php rename to translates/es_(v1.4)/src/Rules/In.php diff --git a/translates/es/src/Rules/Integer.php b/translates/es_(v1.4)/src/Rules/Integer.php similarity index 100% rename from translates/es/src/Rules/Integer.php rename to translates/es_(v1.4)/src/Rules/Integer.php diff --git a/translates/es/src/Rules/Interfaces/BeforeValidate.php b/translates/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php similarity index 100% rename from translates/es/src/Rules/Interfaces/BeforeValidate.php rename to translates/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php diff --git a/translates/es/src/Rules/Interfaces/ModifyValue.php b/translates/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php similarity index 100% rename from translates/es/src/Rules/Interfaces/ModifyValue.php rename to translates/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php diff --git a/translates/es/src/Rules/Ip.php b/translates/es_(v1.4)/src/Rules/Ip.php similarity index 100% rename from translates/es/src/Rules/Ip.php rename to translates/es_(v1.4)/src/Rules/Ip.php diff --git a/translates/es/src/Rules/Ipv4.php b/translates/es_(v1.4)/src/Rules/Ipv4.php similarity index 100% rename from translates/es/src/Rules/Ipv4.php rename to translates/es_(v1.4)/src/Rules/Ipv4.php diff --git a/translates/es/src/Rules/Ipv6.php b/translates/es_(v1.4)/src/Rules/Ipv6.php similarity index 100% rename from translates/es/src/Rules/Ipv6.php rename to translates/es_(v1.4)/src/Rules/Ipv6.php diff --git a/translates/es/src/Rules/Json.php b/translates/es_(v1.4)/src/Rules/Json.php similarity index 100% rename from translates/es/src/Rules/Json.php rename to translates/es_(v1.4)/src/Rules/Json.php diff --git a/translates/es/src/Rules/Lowercase.php b/translates/es_(v1.4)/src/Rules/Lowercase.php similarity index 100% rename from translates/es/src/Rules/Lowercase.php rename to translates/es_(v1.4)/src/Rules/Lowercase.php diff --git a/translates/es/src/Rules/Max.php b/translates/es_(v1.4)/src/Rules/Max.php similarity index 100% rename from translates/es/src/Rules/Max.php rename to translates/es_(v1.4)/src/Rules/Max.php diff --git a/translates/es/src/Rules/Mimes.php b/translates/es_(v1.4)/src/Rules/Mimes.php similarity index 100% rename from translates/es/src/Rules/Mimes.php rename to translates/es_(v1.4)/src/Rules/Mimes.php diff --git a/translates/es/src/Rules/Min.php b/translates/es_(v1.4)/src/Rules/Min.php similarity index 100% rename from translates/es/src/Rules/Min.php rename to translates/es_(v1.4)/src/Rules/Min.php diff --git a/translates/es/src/Rules/NotIn.php b/translates/es_(v1.4)/src/Rules/NotIn.php similarity index 100% rename from translates/es/src/Rules/NotIn.php rename to translates/es_(v1.4)/src/Rules/NotIn.php diff --git a/translates/es/src/Rules/Nullable.php b/translates/es_(v1.4)/src/Rules/Nullable.php similarity index 100% rename from translates/es/src/Rules/Nullable.php rename to translates/es_(v1.4)/src/Rules/Nullable.php diff --git a/translates/es/src/Rules/Numeric.php b/translates/es_(v1.4)/src/Rules/Numeric.php similarity index 100% rename from translates/es/src/Rules/Numeric.php rename to translates/es_(v1.4)/src/Rules/Numeric.php diff --git a/translates/es/src/Rules/Present.php b/translates/es_(v1.4)/src/Rules/Present.php similarity index 100% rename from translates/es/src/Rules/Present.php rename to translates/es_(v1.4)/src/Rules/Present.php diff --git a/translates/es/src/Rules/Regex.php b/translates/es_(v1.4)/src/Rules/Regex.php similarity index 100% rename from translates/es/src/Rules/Regex.php rename to translates/es_(v1.4)/src/Rules/Regex.php diff --git a/translates/es/src/Rules/Required.php b/translates/es_(v1.4)/src/Rules/Required.php similarity index 100% rename from translates/es/src/Rules/Required.php rename to translates/es_(v1.4)/src/Rules/Required.php diff --git a/translates/es/src/Rules/RequiredIf.php b/translates/es_(v1.4)/src/Rules/RequiredIf.php similarity index 100% rename from translates/es/src/Rules/RequiredIf.php rename to translates/es_(v1.4)/src/Rules/RequiredIf.php diff --git a/translates/es/src/Rules/RequiredUnless.php b/translates/es_(v1.4)/src/Rules/RequiredUnless.php similarity index 100% rename from translates/es/src/Rules/RequiredUnless.php rename to translates/es_(v1.4)/src/Rules/RequiredUnless.php diff --git a/translates/es/src/Rules/RequiredWith.php b/translates/es_(v1.4)/src/Rules/RequiredWith.php similarity index 100% rename from translates/es/src/Rules/RequiredWith.php rename to translates/es_(v1.4)/src/Rules/RequiredWith.php diff --git a/translates/es/src/Rules/RequiredWithAll.php b/translates/es_(v1.4)/src/Rules/RequiredWithAll.php similarity index 100% rename from translates/es/src/Rules/RequiredWithAll.php rename to translates/es_(v1.4)/src/Rules/RequiredWithAll.php diff --git a/translates/es/src/Rules/RequiredWithout.php b/translates/es_(v1.4)/src/Rules/RequiredWithout.php similarity index 100% rename from translates/es/src/Rules/RequiredWithout.php rename to translates/es_(v1.4)/src/Rules/RequiredWithout.php diff --git a/translates/es/src/Rules/RequiredWithoutAll.php b/translates/es_(v1.4)/src/Rules/RequiredWithoutAll.php similarity index 100% rename from translates/es/src/Rules/RequiredWithoutAll.php rename to translates/es_(v1.4)/src/Rules/RequiredWithoutAll.php diff --git a/translates/es/src/Rules/Same.php b/translates/es_(v1.4)/src/Rules/Same.php similarity index 100% rename from translates/es/src/Rules/Same.php rename to translates/es_(v1.4)/src/Rules/Same.php diff --git a/translates/es/src/Rules/Traits/DateUtilsTrait.php b/translates/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php similarity index 100% rename from translates/es/src/Rules/Traits/DateUtilsTrait.php rename to translates/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php diff --git a/translates/es/src/Rules/Traits/FileTrait.php b/translates/es_(v1.4)/src/Rules/Traits/FileTrait.php similarity index 100% rename from translates/es/src/Rules/Traits/FileTrait.php rename to translates/es_(v1.4)/src/Rules/Traits/FileTrait.php diff --git a/translates/es/src/Rules/Traits/SizeTrait.php b/translates/es_(v1.4)/src/Rules/Traits/SizeTrait.php similarity index 100% rename from translates/es/src/Rules/Traits/SizeTrait.php rename to translates/es_(v1.4)/src/Rules/Traits/SizeTrait.php diff --git a/translates/es/src/Rules/TypeArray.php b/translates/es_(v1.4)/src/Rules/TypeArray.php similarity index 100% rename from translates/es/src/Rules/TypeArray.php rename to translates/es_(v1.4)/src/Rules/TypeArray.php diff --git a/translates/es/src/Rules/UploadedFile.php b/translates/es_(v1.4)/src/Rules/UploadedFile.php similarity index 100% rename from translates/es/src/Rules/UploadedFile.php rename to translates/es_(v1.4)/src/Rules/UploadedFile.php diff --git a/translates/es/src/Rules/Uppercase.php b/translates/es_(v1.4)/src/Rules/Uppercase.php similarity index 100% rename from translates/es/src/Rules/Uppercase.php rename to translates/es_(v1.4)/src/Rules/Uppercase.php diff --git a/translates/es/src/Rules/Url.php b/translates/es_(v1.4)/src/Rules/Url.php similarity index 100% rename from translates/es/src/Rules/Url.php rename to translates/es_(v1.4)/src/Rules/Url.php diff --git a/translates/es/src/Traits/MessagesTrait.php b/translates/es_(v1.4)/src/Traits/MessagesTrait.php similarity index 100% rename from translates/es/src/Traits/MessagesTrait.php rename to translates/es_(v1.4)/src/Traits/MessagesTrait.php diff --git a/translates/es/src/Traits/TranslationsTrait.php b/translates/es_(v1.4)/src/Traits/TranslationsTrait.php similarity index 100% rename from translates/es/src/Traits/TranslationsTrait.php rename to translates/es_(v1.4)/src/Traits/TranslationsTrait.php diff --git a/translates/es/src/Validation.php b/translates/es_(v1.4)/src/Validation.php similarity index 100% rename from translates/es/src/Validation.php rename to translates/es_(v1.4)/src/Validation.php diff --git a/translates/es/src/Validator.php b/translates/es_(v1.4)/src/Validator.php similarity index 100% rename from translates/es/src/Validator.php rename to translates/es_(v1.4)/src/Validator.php From ee8516319f1cd73b596dbeab5c223e6426609414 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 18:15:20 -0300 Subject: [PATCH 3/7] ES --- {translates => translations}/es_(v1.4)/src/Attribute.php | 0 {translates => translations}/es_(v1.4)/src/ErrorBag.php | 0 {translates => translations}/es_(v1.4)/src/Helper.php | 0 {translates => translations}/es_(v1.4)/src/MimeTypeGuesser.php | 0 .../es_(v1.4)/src/MissingRequiredParameterException.php | 0 {translates => translations}/es_(v1.4)/src/Rule.php | 0 .../es_(v1.4)/src/RuleNotFoundException.php | 0 {translates => translations}/es_(v1.4)/src/RuleQuashException.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Accepted.php | 0 {translates => translations}/es_(v1.4)/src/Rules/After.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Alpha.php | 0 {translates => translations}/es_(v1.4)/src/Rules/AlphaDash.php | 0 {translates => translations}/es_(v1.4)/src/Rules/AlphaNum.php | 0 {translates => translations}/es_(v1.4)/src/Rules/AlphaSpaces.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Before.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Between.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Boolean.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Callback.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Date.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Defaults.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Different.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Digits.php | 0 .../es_(v1.4)/src/Rules/DigitsBetween.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Email.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Extension.php | 0 {translates => translations}/es_(v1.4)/src/Rules/In.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Integer.php | 0 .../es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php | 0 .../es_(v1.4)/src/Rules/Interfaces/ModifyValue.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Ip.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Ipv4.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Ipv6.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Json.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Lowercase.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Max.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Mimes.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Min.php | 0 {translates => translations}/es_(v1.4)/src/Rules/NotIn.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Nullable.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Numeric.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Present.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Regex.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Required.php | 0 {translates => translations}/es_(v1.4)/src/Rules/RequiredIf.php | 0 .../es_(v1.4)/src/Rules/RequiredUnless.php | 0 {translates => translations}/es_(v1.4)/src/Rules/RequiredWith.php | 0 .../es_(v1.4)/src/Rules/RequiredWithAll.php | 0 .../es_(v1.4)/src/Rules/RequiredWithout.php | 0 .../es_(v1.4)/src/Rules/RequiredWithoutAll.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Same.php | 0 .../es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php | 0 .../es_(v1.4)/src/Rules/Traits/FileTrait.php | 0 .../es_(v1.4)/src/Rules/Traits/SizeTrait.php | 0 {translates => translations}/es_(v1.4)/src/Rules/TypeArray.php | 0 {translates => translations}/es_(v1.4)/src/Rules/UploadedFile.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Uppercase.php | 0 {translates => translations}/es_(v1.4)/src/Rules/Url.php | 0 .../es_(v1.4)/src/Traits/MessagesTrait.php | 0 .../es_(v1.4)/src/Traits/TranslationsTrait.php | 0 {translates => translations}/es_(v1.4)/src/Validation.php | 0 {translates => translations}/es_(v1.4)/src/Validator.php | 0 61 files changed, 0 insertions(+), 0 deletions(-) rename {translates => translations}/es_(v1.4)/src/Attribute.php (100%) rename {translates => translations}/es_(v1.4)/src/ErrorBag.php (100%) rename {translates => translations}/es_(v1.4)/src/Helper.php (100%) rename {translates => translations}/es_(v1.4)/src/MimeTypeGuesser.php (100%) rename {translates => translations}/es_(v1.4)/src/MissingRequiredParameterException.php (100%) rename {translates => translations}/es_(v1.4)/src/Rule.php (100%) rename {translates => translations}/es_(v1.4)/src/RuleNotFoundException.php (100%) rename {translates => translations}/es_(v1.4)/src/RuleQuashException.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Accepted.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/After.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Alpha.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/AlphaDash.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/AlphaNum.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/AlphaSpaces.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Before.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Between.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Boolean.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Callback.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Date.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Defaults.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Different.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Digits.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/DigitsBetween.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Email.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Extension.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/In.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Integer.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Ip.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Ipv4.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Ipv6.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Json.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Lowercase.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Max.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Mimes.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Min.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/NotIn.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Nullable.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Numeric.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Present.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Regex.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Required.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredIf.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredUnless.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredWith.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredWithAll.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredWithout.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/RequiredWithoutAll.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Same.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Traits/FileTrait.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Traits/SizeTrait.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/TypeArray.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/UploadedFile.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Uppercase.php (100%) rename {translates => translations}/es_(v1.4)/src/Rules/Url.php (100%) rename {translates => translations}/es_(v1.4)/src/Traits/MessagesTrait.php (100%) rename {translates => translations}/es_(v1.4)/src/Traits/TranslationsTrait.php (100%) rename {translates => translations}/es_(v1.4)/src/Validation.php (100%) rename {translates => translations}/es_(v1.4)/src/Validator.php (100%) diff --git a/translates/es_(v1.4)/src/Attribute.php b/translations/es_(v1.4)/src/Attribute.php similarity index 100% rename from translates/es_(v1.4)/src/Attribute.php rename to translations/es_(v1.4)/src/Attribute.php diff --git a/translates/es_(v1.4)/src/ErrorBag.php b/translations/es_(v1.4)/src/ErrorBag.php similarity index 100% rename from translates/es_(v1.4)/src/ErrorBag.php rename to translations/es_(v1.4)/src/ErrorBag.php diff --git a/translates/es_(v1.4)/src/Helper.php b/translations/es_(v1.4)/src/Helper.php similarity index 100% rename from translates/es_(v1.4)/src/Helper.php rename to translations/es_(v1.4)/src/Helper.php diff --git a/translates/es_(v1.4)/src/MimeTypeGuesser.php b/translations/es_(v1.4)/src/MimeTypeGuesser.php similarity index 100% rename from translates/es_(v1.4)/src/MimeTypeGuesser.php rename to translations/es_(v1.4)/src/MimeTypeGuesser.php diff --git a/translates/es_(v1.4)/src/MissingRequiredParameterException.php b/translations/es_(v1.4)/src/MissingRequiredParameterException.php similarity index 100% rename from translates/es_(v1.4)/src/MissingRequiredParameterException.php rename to translations/es_(v1.4)/src/MissingRequiredParameterException.php diff --git a/translates/es_(v1.4)/src/Rule.php b/translations/es_(v1.4)/src/Rule.php similarity index 100% rename from translates/es_(v1.4)/src/Rule.php rename to translations/es_(v1.4)/src/Rule.php diff --git a/translates/es_(v1.4)/src/RuleNotFoundException.php b/translations/es_(v1.4)/src/RuleNotFoundException.php similarity index 100% rename from translates/es_(v1.4)/src/RuleNotFoundException.php rename to translations/es_(v1.4)/src/RuleNotFoundException.php diff --git a/translates/es_(v1.4)/src/RuleQuashException.php b/translations/es_(v1.4)/src/RuleQuashException.php similarity index 100% rename from translates/es_(v1.4)/src/RuleQuashException.php rename to translations/es_(v1.4)/src/RuleQuashException.php diff --git a/translates/es_(v1.4)/src/Rules/Accepted.php b/translations/es_(v1.4)/src/Rules/Accepted.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Accepted.php rename to translations/es_(v1.4)/src/Rules/Accepted.php diff --git a/translates/es_(v1.4)/src/Rules/After.php b/translations/es_(v1.4)/src/Rules/After.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/After.php rename to translations/es_(v1.4)/src/Rules/After.php diff --git a/translates/es_(v1.4)/src/Rules/Alpha.php b/translations/es_(v1.4)/src/Rules/Alpha.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Alpha.php rename to translations/es_(v1.4)/src/Rules/Alpha.php diff --git a/translates/es_(v1.4)/src/Rules/AlphaDash.php b/translations/es_(v1.4)/src/Rules/AlphaDash.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/AlphaDash.php rename to translations/es_(v1.4)/src/Rules/AlphaDash.php diff --git a/translates/es_(v1.4)/src/Rules/AlphaNum.php b/translations/es_(v1.4)/src/Rules/AlphaNum.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/AlphaNum.php rename to translations/es_(v1.4)/src/Rules/AlphaNum.php diff --git a/translates/es_(v1.4)/src/Rules/AlphaSpaces.php b/translations/es_(v1.4)/src/Rules/AlphaSpaces.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/AlphaSpaces.php rename to translations/es_(v1.4)/src/Rules/AlphaSpaces.php diff --git a/translates/es_(v1.4)/src/Rules/Before.php b/translations/es_(v1.4)/src/Rules/Before.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Before.php rename to translations/es_(v1.4)/src/Rules/Before.php diff --git a/translates/es_(v1.4)/src/Rules/Between.php b/translations/es_(v1.4)/src/Rules/Between.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Between.php rename to translations/es_(v1.4)/src/Rules/Between.php diff --git a/translates/es_(v1.4)/src/Rules/Boolean.php b/translations/es_(v1.4)/src/Rules/Boolean.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Boolean.php rename to translations/es_(v1.4)/src/Rules/Boolean.php diff --git a/translates/es_(v1.4)/src/Rules/Callback.php b/translations/es_(v1.4)/src/Rules/Callback.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Callback.php rename to translations/es_(v1.4)/src/Rules/Callback.php diff --git a/translates/es_(v1.4)/src/Rules/Date.php b/translations/es_(v1.4)/src/Rules/Date.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Date.php rename to translations/es_(v1.4)/src/Rules/Date.php diff --git a/translates/es_(v1.4)/src/Rules/Defaults.php b/translations/es_(v1.4)/src/Rules/Defaults.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Defaults.php rename to translations/es_(v1.4)/src/Rules/Defaults.php diff --git a/translates/es_(v1.4)/src/Rules/Different.php b/translations/es_(v1.4)/src/Rules/Different.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Different.php rename to translations/es_(v1.4)/src/Rules/Different.php diff --git a/translates/es_(v1.4)/src/Rules/Digits.php b/translations/es_(v1.4)/src/Rules/Digits.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Digits.php rename to translations/es_(v1.4)/src/Rules/Digits.php diff --git a/translates/es_(v1.4)/src/Rules/DigitsBetween.php b/translations/es_(v1.4)/src/Rules/DigitsBetween.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/DigitsBetween.php rename to translations/es_(v1.4)/src/Rules/DigitsBetween.php diff --git a/translates/es_(v1.4)/src/Rules/Email.php b/translations/es_(v1.4)/src/Rules/Email.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Email.php rename to translations/es_(v1.4)/src/Rules/Email.php diff --git a/translates/es_(v1.4)/src/Rules/Extension.php b/translations/es_(v1.4)/src/Rules/Extension.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Extension.php rename to translations/es_(v1.4)/src/Rules/Extension.php diff --git a/translates/es_(v1.4)/src/Rules/In.php b/translations/es_(v1.4)/src/Rules/In.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/In.php rename to translations/es_(v1.4)/src/Rules/In.php diff --git a/translates/es_(v1.4)/src/Rules/Integer.php b/translations/es_(v1.4)/src/Rules/Integer.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Integer.php rename to translations/es_(v1.4)/src/Rules/Integer.php diff --git a/translates/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php b/translations/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php rename to translations/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php diff --git a/translates/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php b/translations/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php rename to translations/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php diff --git a/translates/es_(v1.4)/src/Rules/Ip.php b/translations/es_(v1.4)/src/Rules/Ip.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Ip.php rename to translations/es_(v1.4)/src/Rules/Ip.php diff --git a/translates/es_(v1.4)/src/Rules/Ipv4.php b/translations/es_(v1.4)/src/Rules/Ipv4.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Ipv4.php rename to translations/es_(v1.4)/src/Rules/Ipv4.php diff --git a/translates/es_(v1.4)/src/Rules/Ipv6.php b/translations/es_(v1.4)/src/Rules/Ipv6.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Ipv6.php rename to translations/es_(v1.4)/src/Rules/Ipv6.php diff --git a/translates/es_(v1.4)/src/Rules/Json.php b/translations/es_(v1.4)/src/Rules/Json.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Json.php rename to translations/es_(v1.4)/src/Rules/Json.php diff --git a/translates/es_(v1.4)/src/Rules/Lowercase.php b/translations/es_(v1.4)/src/Rules/Lowercase.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Lowercase.php rename to translations/es_(v1.4)/src/Rules/Lowercase.php diff --git a/translates/es_(v1.4)/src/Rules/Max.php b/translations/es_(v1.4)/src/Rules/Max.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Max.php rename to translations/es_(v1.4)/src/Rules/Max.php diff --git a/translates/es_(v1.4)/src/Rules/Mimes.php b/translations/es_(v1.4)/src/Rules/Mimes.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Mimes.php rename to translations/es_(v1.4)/src/Rules/Mimes.php diff --git a/translates/es_(v1.4)/src/Rules/Min.php b/translations/es_(v1.4)/src/Rules/Min.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Min.php rename to translations/es_(v1.4)/src/Rules/Min.php diff --git a/translates/es_(v1.4)/src/Rules/NotIn.php b/translations/es_(v1.4)/src/Rules/NotIn.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/NotIn.php rename to translations/es_(v1.4)/src/Rules/NotIn.php diff --git a/translates/es_(v1.4)/src/Rules/Nullable.php b/translations/es_(v1.4)/src/Rules/Nullable.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Nullable.php rename to translations/es_(v1.4)/src/Rules/Nullable.php diff --git a/translates/es_(v1.4)/src/Rules/Numeric.php b/translations/es_(v1.4)/src/Rules/Numeric.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Numeric.php rename to translations/es_(v1.4)/src/Rules/Numeric.php diff --git a/translates/es_(v1.4)/src/Rules/Present.php b/translations/es_(v1.4)/src/Rules/Present.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Present.php rename to translations/es_(v1.4)/src/Rules/Present.php diff --git a/translates/es_(v1.4)/src/Rules/Regex.php b/translations/es_(v1.4)/src/Rules/Regex.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Regex.php rename to translations/es_(v1.4)/src/Rules/Regex.php diff --git a/translates/es_(v1.4)/src/Rules/Required.php b/translations/es_(v1.4)/src/Rules/Required.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Required.php rename to translations/es_(v1.4)/src/Rules/Required.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredIf.php b/translations/es_(v1.4)/src/Rules/RequiredIf.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredIf.php rename to translations/es_(v1.4)/src/Rules/RequiredIf.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredUnless.php b/translations/es_(v1.4)/src/Rules/RequiredUnless.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredUnless.php rename to translations/es_(v1.4)/src/Rules/RequiredUnless.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredWith.php b/translations/es_(v1.4)/src/Rules/RequiredWith.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredWith.php rename to translations/es_(v1.4)/src/Rules/RequiredWith.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredWithAll.php b/translations/es_(v1.4)/src/Rules/RequiredWithAll.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredWithAll.php rename to translations/es_(v1.4)/src/Rules/RequiredWithAll.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredWithout.php b/translations/es_(v1.4)/src/Rules/RequiredWithout.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredWithout.php rename to translations/es_(v1.4)/src/Rules/RequiredWithout.php diff --git a/translates/es_(v1.4)/src/Rules/RequiredWithoutAll.php b/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/RequiredWithoutAll.php rename to translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php diff --git a/translates/es_(v1.4)/src/Rules/Same.php b/translations/es_(v1.4)/src/Rules/Same.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Same.php rename to translations/es_(v1.4)/src/Rules/Same.php diff --git a/translates/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php b/translations/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php rename to translations/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php diff --git a/translates/es_(v1.4)/src/Rules/Traits/FileTrait.php b/translations/es_(v1.4)/src/Rules/Traits/FileTrait.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Traits/FileTrait.php rename to translations/es_(v1.4)/src/Rules/Traits/FileTrait.php diff --git a/translates/es_(v1.4)/src/Rules/Traits/SizeTrait.php b/translations/es_(v1.4)/src/Rules/Traits/SizeTrait.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Traits/SizeTrait.php rename to translations/es_(v1.4)/src/Rules/Traits/SizeTrait.php diff --git a/translates/es_(v1.4)/src/Rules/TypeArray.php b/translations/es_(v1.4)/src/Rules/TypeArray.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/TypeArray.php rename to translations/es_(v1.4)/src/Rules/TypeArray.php diff --git a/translates/es_(v1.4)/src/Rules/UploadedFile.php b/translations/es_(v1.4)/src/Rules/UploadedFile.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/UploadedFile.php rename to translations/es_(v1.4)/src/Rules/UploadedFile.php diff --git a/translates/es_(v1.4)/src/Rules/Uppercase.php b/translations/es_(v1.4)/src/Rules/Uppercase.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Uppercase.php rename to translations/es_(v1.4)/src/Rules/Uppercase.php diff --git a/translates/es_(v1.4)/src/Rules/Url.php b/translations/es_(v1.4)/src/Rules/Url.php similarity index 100% rename from translates/es_(v1.4)/src/Rules/Url.php rename to translations/es_(v1.4)/src/Rules/Url.php diff --git a/translates/es_(v1.4)/src/Traits/MessagesTrait.php b/translations/es_(v1.4)/src/Traits/MessagesTrait.php similarity index 100% rename from translates/es_(v1.4)/src/Traits/MessagesTrait.php rename to translations/es_(v1.4)/src/Traits/MessagesTrait.php diff --git a/translates/es_(v1.4)/src/Traits/TranslationsTrait.php b/translations/es_(v1.4)/src/Traits/TranslationsTrait.php similarity index 100% rename from translates/es_(v1.4)/src/Traits/TranslationsTrait.php rename to translations/es_(v1.4)/src/Traits/TranslationsTrait.php diff --git a/translates/es_(v1.4)/src/Validation.php b/translations/es_(v1.4)/src/Validation.php similarity index 100% rename from translates/es_(v1.4)/src/Validation.php rename to translations/es_(v1.4)/src/Validation.php diff --git a/translates/es_(v1.4)/src/Validator.php b/translations/es_(v1.4)/src/Validator.php similarity index 100% rename from translates/es_(v1.4)/src/Validator.php rename to translations/es_(v1.4)/src/Validator.php From c35657d74f516b4f8141733e219c570b4b9126a4 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 18:35:22 -0300 Subject: [PATCH 4/7] ES --- translations/es_(v1.4)/src/Rules/Defaults.php | 2 +- translations/es_(v1.4)/src/Rules/Different.php | 2 +- translations/es_(v1.4)/src/Rules/Digits.php | 2 +- translations/es_(v1.4)/src/Rules/DigitsBetween.php | 2 +- translations/es_(v1.4)/src/Rules/Email.php | 2 +- translations/es_(v1.4)/src/Rules/Extension.php | 2 +- translations/es_(v1.4)/src/Rules/In.php | 2 +- translations/es_(v1.4)/src/Rules/Integer.php | 2 +- translations/es_(v1.4)/src/Rules/Ip.php | 2 +- translations/es_(v1.4)/src/Rules/Ipv4.php | 2 +- translations/es_(v1.4)/src/Rules/Ipv6.php | 2 +- translations/es_(v1.4)/src/Rules/Json.php | 2 +- translations/es_(v1.4)/src/Rules/Lowercase.php | 2 +- translations/es_(v1.4)/src/Rules/Max.php | 2 +- translations/es_(v1.4)/src/Rules/Mimes.php | 2 +- translations/es_(v1.4)/src/Rules/Min.php | 2 +- translations/es_(v1.4)/src/Rules/NotIn.php | 2 +- translations/es_(v1.4)/src/Rules/Numeric.php | 2 +- translations/es_(v1.4)/src/Rules/Present.php | 2 +- translations/es_(v1.4)/src/Rules/Regex.php | 2 +- translations/es_(v1.4)/src/Rules/Required.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredIf.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredUnless.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredWith.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredWithAll.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredWithout.php | 2 +- translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php | 2 +- translations/es_(v1.4)/src/Rules/Same.php | 2 +- translations/es_(v1.4)/src/Rules/TypeArray.php | 2 +- translations/es_(v1.4)/src/Rules/UploadedFile.php | 8 ++++---- translations/es_(v1.4)/src/Rules/Uppercase.php | 2 +- translations/es_(v1.4)/src/Rules/Url.php | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/translations/es_(v1.4)/src/Rules/Defaults.php b/translations/es_(v1.4)/src/Rules/Defaults.php index b99f6cc..918b246 100644 --- a/translations/es_(v1.4)/src/Rules/Defaults.php +++ b/translations/es_(v1.4)/src/Rules/Defaults.php @@ -9,7 +9,7 @@ class Defaults extends Rule implements ModifyValue { /** @var string */ - protected $message = "The :attribute default is :default"; + protected $message = ":attribute por defecto es :default."; /** @var array */ protected $fillableParams = ['default']; diff --git a/translations/es_(v1.4)/src/Rules/Different.php b/translations/es_(v1.4)/src/Rules/Different.php index 3577318..47f5286 100644 --- a/translations/es_(v1.4)/src/Rules/Different.php +++ b/translations/es_(v1.4)/src/Rules/Different.php @@ -8,7 +8,7 @@ class Different extends Rule { /** @var string */ - protected $message = "The :attribute must be different with :field"; + protected $message = ":attribute debe ser diferente de :field."; /** @var array */ protected $fillableParams = ['field']; diff --git a/translations/es_(v1.4)/src/Rules/Digits.php b/translations/es_(v1.4)/src/Rules/Digits.php index 87a5f65..80c3ffe 100644 --- a/translations/es_(v1.4)/src/Rules/Digits.php +++ b/translations/es_(v1.4)/src/Rules/Digits.php @@ -8,7 +8,7 @@ class Digits extends Rule { /** @var string */ - protected $message = "The :attribute must be numeric and must have an exact length of :length"; + protected $message = ":attribute debe ser numérico y debe tener una longitud exacta de :length."; /** @var array */ protected $fillableParams = ['length']; diff --git a/translations/es_(v1.4)/src/Rules/DigitsBetween.php b/translations/es_(v1.4)/src/Rules/DigitsBetween.php index 539c09d..9241c9d 100644 --- a/translations/es_(v1.4)/src/Rules/DigitsBetween.php +++ b/translations/es_(v1.4)/src/Rules/DigitsBetween.php @@ -8,7 +8,7 @@ class DigitsBetween extends Rule { /** @var string */ - protected $message = "The :attribute must have a length between the given :min and :max"; + protected $message = ":attribute debe tener una longitud entre :min y :max."; /** @var array */ protected $fillableParams = ['min', 'max']; diff --git a/translations/es_(v1.4)/src/Rules/Email.php b/translations/es_(v1.4)/src/Rules/Email.php index a9bd236..3ded6de 100644 --- a/translations/es_(v1.4)/src/Rules/Email.php +++ b/translations/es_(v1.4)/src/Rules/Email.php @@ -8,7 +8,7 @@ class Email extends Rule { /** @var string */ - protected $message = "The :attribute is not valid email"; + protected $message = ":attribute no es un correo electrónico válido."; /** * Check $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Extension.php b/translations/es_(v1.4)/src/Rules/Extension.php index 60200b6..ed067a3 100644 --- a/translations/es_(v1.4)/src/Rules/Extension.php +++ b/translations/es_(v1.4)/src/Rules/Extension.php @@ -9,7 +9,7 @@ class Extension extends Rule { /** @var string */ - protected $message = "The :attribute must be a :allowed_extensions file"; + protected $message = ":attribute debe ser un :allowed_extensions archivo."; /** * Given $params and assign the $this->params diff --git a/translations/es_(v1.4)/src/Rules/In.php b/translations/es_(v1.4)/src/Rules/In.php index 1971ed5..f82965c 100644 --- a/translations/es_(v1.4)/src/Rules/In.php +++ b/translations/es_(v1.4)/src/Rules/In.php @@ -9,7 +9,7 @@ class In extends Rule { /** @var string */ - protected $message = "The :attribute only allows :allowed_values"; + protected $message = ":attribute solo permite :allowed_values."; /** @var bool */ protected $strict = false; diff --git a/translations/es_(v1.4)/src/Rules/Integer.php b/translations/es_(v1.4)/src/Rules/Integer.php index 47aa702..ebe484f 100644 --- a/translations/es_(v1.4)/src/Rules/Integer.php +++ b/translations/es_(v1.4)/src/Rules/Integer.php @@ -8,7 +8,7 @@ class Integer extends Rule { /** @var string */ - protected $message = "The :attribute must be integer"; + protected $message = ":attribute debe ser un número entero."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Ip.php b/translations/es_(v1.4)/src/Rules/Ip.php index 038c48a..86368f2 100644 --- a/translations/es_(v1.4)/src/Rules/Ip.php +++ b/translations/es_(v1.4)/src/Rules/Ip.php @@ -8,7 +8,7 @@ class Ip extends Rule { /** @var string */ - protected $message = "The :attribute is not valid IP Address"; + protected $message = ":attribute no es una dirección IP válida."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Ipv4.php b/translations/es_(v1.4)/src/Rules/Ipv4.php index 5690c4f..87503d3 100644 --- a/translations/es_(v1.4)/src/Rules/Ipv4.php +++ b/translations/es_(v1.4)/src/Rules/Ipv4.php @@ -8,7 +8,7 @@ class Ipv4 extends Rule { /** @var string */ - protected $message = "The :attribute is not valid IPv4 Address"; + protected $message = ":attribute no es una dirección IPv4 válida."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Ipv6.php b/translations/es_(v1.4)/src/Rules/Ipv6.php index 0aff254..20e38f3 100644 --- a/translations/es_(v1.4)/src/Rules/Ipv6.php +++ b/translations/es_(v1.4)/src/Rules/Ipv6.php @@ -8,7 +8,7 @@ class Ipv6 extends Rule { /** @var string */ - protected $message = "The :attribute is not valid IPv6 Address"; + protected $message = ":attribute no es una dirección IPv6 válida."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Json.php b/translations/es_(v1.4)/src/Rules/Json.php index eb3ab9f..fdfc003 100644 --- a/translations/es_(v1.4)/src/Rules/Json.php +++ b/translations/es_(v1.4)/src/Rules/Json.php @@ -8,7 +8,7 @@ class Json extends Rule { /** @var string */ - protected $message = "The :attribute must be a valid JSON string"; + protected $message = ":attribute debe ser un JSON válido."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Lowercase.php b/translations/es_(v1.4)/src/Rules/Lowercase.php index 7df7599..65d720d 100644 --- a/translations/es_(v1.4)/src/Rules/Lowercase.php +++ b/translations/es_(v1.4)/src/Rules/Lowercase.php @@ -8,7 +8,7 @@ class Lowercase extends Rule { /** @var string */ - protected $message = "The :attribute must be lowercase"; + protected $message = ":attribute debe estar en minúsculas."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Max.php b/translations/es_(v1.4)/src/Rules/Max.php index 709d28b..c969f0c 100644 --- a/translations/es_(v1.4)/src/Rules/Max.php +++ b/translations/es_(v1.4)/src/Rules/Max.php @@ -9,7 +9,7 @@ class Max extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = "The :attribute maximum is :max"; + protected $message = ":attribute el máximo es :max."; /** @var array */ protected $fillableParams = ['max']; diff --git a/translations/es_(v1.4)/src/Rules/Mimes.php b/translations/es_(v1.4)/src/Rules/Mimes.php index 9abb5a8..35c1ae9 100644 --- a/translations/es_(v1.4)/src/Rules/Mimes.php +++ b/translations/es_(v1.4)/src/Rules/Mimes.php @@ -11,7 +11,7 @@ class Mimes extends Rule use Traits\FileTrait; /** @var string */ - protected $message = "The :attribute file type must be :allowed_types"; + protected $message = ":attribute el tipo de archivo debe ser :allowed_types."; /** @var string|int */ protected $maxSize = null; diff --git a/translations/es_(v1.4)/src/Rules/Min.php b/translations/es_(v1.4)/src/Rules/Min.php index 555f8d9..d7d1818 100644 --- a/translations/es_(v1.4)/src/Rules/Min.php +++ b/translations/es_(v1.4)/src/Rules/Min.php @@ -9,7 +9,7 @@ class Min extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = "The :attribute minimum is :min"; + protected $message = ":attribute el mínimo es :min."; /** @var array */ protected $fillableParams = ['min']; diff --git a/translations/es_(v1.4)/src/Rules/NotIn.php b/translations/es_(v1.4)/src/Rules/NotIn.php index f70275a..fb3c78b 100644 --- a/translations/es_(v1.4)/src/Rules/NotIn.php +++ b/translations/es_(v1.4)/src/Rules/NotIn.php @@ -9,7 +9,7 @@ class NotIn extends Rule { /** @var string */ - protected $message = "The :attribute is not allowing :disallowed_values"; + protected $message = ":attribute no está permitiendo :disallowed_values."; /** @var bool */ protected $strict = false; diff --git a/translations/es_(v1.4)/src/Rules/Numeric.php b/translations/es_(v1.4)/src/Rules/Numeric.php index ddbf6bd..c2c1d15 100644 --- a/translations/es_(v1.4)/src/Rules/Numeric.php +++ b/translations/es_(v1.4)/src/Rules/Numeric.php @@ -8,7 +8,7 @@ class Numeric extends Rule { /** @var string */ - protected $message = "The :attribute must be numeric"; + protected $message = ":attribute debe ser numérico."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Present.php b/translations/es_(v1.4)/src/Rules/Present.php index a38083c..d78f85d 100644 --- a/translations/es_(v1.4)/src/Rules/Present.php +++ b/translations/es_(v1.4)/src/Rules/Present.php @@ -10,7 +10,7 @@ class Present extends Rule protected $implicit = true; /** @var string */ - protected $message = "The :attribute must be present"; + protected $message = ":attribute debe estar presente."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Regex.php b/translations/es_(v1.4)/src/Rules/Regex.php index 470944c..b1ec252 100644 --- a/translations/es_(v1.4)/src/Rules/Regex.php +++ b/translations/es_(v1.4)/src/Rules/Regex.php @@ -8,7 +8,7 @@ class Regex extends Rule { /** @var string */ - protected $message = "The :attribute is not valid format"; + protected $message = ":attribute no es un formato válido."; /** @var array */ protected $fillableParams = ['regex']; diff --git a/translations/es_(v1.4)/src/Rules/Required.php b/translations/es_(v1.4)/src/Rules/Required.php index 543a794..655bf07 100644 --- a/translations/es_(v1.4)/src/Rules/Required.php +++ b/translations/es_(v1.4)/src/Rules/Required.php @@ -12,7 +12,7 @@ class Required extends Rule protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/RequiredIf.php b/translations/es_(v1.4)/src/Rules/RequiredIf.php index fb4eac4..adbd20d 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredIf.php +++ b/translations/es_(v1.4)/src/Rules/RequiredIf.php @@ -10,7 +10,7 @@ class RequiredIf extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign the $this->params diff --git a/translations/es_(v1.4)/src/Rules/RequiredUnless.php b/translations/es_(v1.4)/src/Rules/RequiredUnless.php index dc1e3a1..dfea270 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredUnless.php +++ b/translations/es_(v1.4)/src/Rules/RequiredUnless.php @@ -10,7 +10,7 @@ class RequiredUnless extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign the $this->params diff --git a/translations/es_(v1.4)/src/Rules/RequiredWith.php b/translations/es_(v1.4)/src/Rules/RequiredWith.php index 5fd809c..4cf0083 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredWith.php +++ b/translations/es_(v1.4)/src/Rules/RequiredWith.php @@ -10,7 +10,7 @@ class RequiredWith extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithAll.php b/translations/es_(v1.4)/src/Rules/RequiredWithAll.php index ba7ad59..3c9678d 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredWithAll.php +++ b/translations/es_(v1.4)/src/Rules/RequiredWithAll.php @@ -10,7 +10,7 @@ class RequiredWithAll extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithout.php b/translations/es_(v1.4)/src/Rules/RequiredWithout.php index 074fc0d..4c4ac4f 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredWithout.php +++ b/translations/es_(v1.4)/src/Rules/RequiredWithout.php @@ -10,7 +10,7 @@ class RequiredWithout extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php b/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php index 53bac2c..4332ac2 100644 --- a/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php +++ b/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php @@ -10,7 +10,7 @@ class RequiredWithoutAll extends Required protected $implicit = true; /** @var string */ - protected $message = "The :attribute is required"; + protected $message = ":attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/es_(v1.4)/src/Rules/Same.php b/translations/es_(v1.4)/src/Rules/Same.php index b127b55..f863960 100644 --- a/translations/es_(v1.4)/src/Rules/Same.php +++ b/translations/es_(v1.4)/src/Rules/Same.php @@ -8,7 +8,7 @@ class Same extends Rule { /** @var string */ - protected $message = "The :attribute must be same with :field"; + protected $message = ":attribute debe ser lo mismo con :field."; /** @var array */ protected $fillableParams = ['field']; diff --git a/translations/es_(v1.4)/src/Rules/TypeArray.php b/translations/es_(v1.4)/src/Rules/TypeArray.php index 311e5cc..2e3d8b7 100644 --- a/translations/es_(v1.4)/src/Rules/TypeArray.php +++ b/translations/es_(v1.4)/src/Rules/TypeArray.php @@ -8,7 +8,7 @@ class TypeArray extends Rule { /** @var string */ - protected $message = "The :attribute must be array"; + protected $message = ":attribute debe ser una matriz."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/UploadedFile.php b/translations/es_(v1.4)/src/Rules/UploadedFile.php index ce5830e..ba2dc4c 100644 --- a/translations/es_(v1.4)/src/Rules/UploadedFile.php +++ b/translations/es_(v1.4)/src/Rules/UploadedFile.php @@ -12,7 +12,7 @@ class UploadedFile extends Rule implements BeforeValidate use Traits\FileTrait, Traits\SizeTrait; /** @var string */ - protected $message = "The :attribute is not valid uploaded file"; + protected $message = ":attribute no es un archivo subido válido."; /** @var string|int */ protected $maxSize = null; @@ -155,7 +155,7 @@ public function check($value): bool if ($minSize) { $bytesMinSize = $this->getBytesSize($minSize); if ($value['size'] < $bytesMinSize) { - $this->setMessage('The :attribute file is too small, minimum size is :min_size'); + $this->setMessage(':attribute el archivo es demasiado pequeño, el tamaño mínimo es :min_size.'); return false; } } @@ -163,7 +163,7 @@ public function check($value): bool if ($maxSize) { $bytesMaxSize = $this->getBytesSize($maxSize); if ($value['size'] > $bytesMaxSize) { - $this->setMessage('The :attribute file is too large, maximum size is :max_size'); + $this->setMessage(':attribute el archivo es demasiado grande, el tamaño máximo es :max_size.'); return false; } } @@ -174,7 +174,7 @@ public function check($value): bool unset($guesser); if (!in_array($ext, $allowedTypes)) { - $this->setMessage('The :attribute file type must be :allowed_types'); + $this->setMessage(':attribute el tipo de archivo debe ser :allowed_types.'); return false; } } diff --git a/translations/es_(v1.4)/src/Rules/Uppercase.php b/translations/es_(v1.4)/src/Rules/Uppercase.php index 11300dd..f15091e 100644 --- a/translations/es_(v1.4)/src/Rules/Uppercase.php +++ b/translations/es_(v1.4)/src/Rules/Uppercase.php @@ -8,7 +8,7 @@ class Uppercase extends Rule { /** @var string */ - protected $message = "The :attribute must be uppercase"; + protected $message = ":attribute debe estar en mayúsculas."; /** * Check the $value is valid diff --git a/translations/es_(v1.4)/src/Rules/Url.php b/translations/es_(v1.4)/src/Rules/Url.php index 3ed8583..190a469 100644 --- a/translations/es_(v1.4)/src/Rules/Url.php +++ b/translations/es_(v1.4)/src/Rules/Url.php @@ -8,7 +8,7 @@ class Url extends Rule { /** @var string */ - protected $message = "The :attribute is not valid url"; + protected $message = ":attribute no es una URL válida."; /** * Given $params and assign $this->params From 4c8bc0a491add2b368bb8ea0ec03bbbef96cd2c9 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 18:39:16 -0300 Subject: [PATCH 5/7] Translations ES v1.4.0 --- translations/{es_(v1.4) => versions/v1.4.0/es}/src/Attribute.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/ErrorBag.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Helper.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/MimeTypeGuesser.php | 0 .../v1.4.0/es}/src/MissingRequiredParameterException.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rule.php | 0 .../v1.4.0/es}/src/RuleNotFoundException.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/RuleQuashException.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Accepted.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/After.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Alpha.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaDash.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaNum.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaSpaces.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Before.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Between.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Boolean.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Callback.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Date.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Defaults.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Different.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Digits.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/DigitsBetween.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Email.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Extension.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/In.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Integer.php | 0 .../v1.4.0/es}/src/Rules/Interfaces/BeforeValidate.php | 0 .../v1.4.0/es}/src/Rules/Interfaces/ModifyValue.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ip.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ipv4.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ipv6.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Json.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Lowercase.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Max.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Mimes.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Min.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/NotIn.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Nullable.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Numeric.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Present.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Regex.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Required.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredIf.php | 0 .../v1.4.0/es}/src/Rules/RequiredUnless.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredWith.php | 0 .../v1.4.0/es}/src/Rules/RequiredWithAll.php | 0 .../v1.4.0/es}/src/Rules/RequiredWithout.php | 0 .../v1.4.0/es}/src/Rules/RequiredWithoutAll.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Same.php | 0 .../v1.4.0/es}/src/Rules/Traits/DateUtilsTrait.php | 0 .../v1.4.0/es}/src/Rules/Traits/FileTrait.php | 0 .../v1.4.0/es}/src/Rules/Traits/SizeTrait.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/TypeArray.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/UploadedFile.php | 0 .../{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Uppercase.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Url.php | 0 .../v1.4.0/es}/src/Traits/MessagesTrait.php | 0 .../v1.4.0/es}/src/Traits/TranslationsTrait.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Validation.php | 0 translations/{es_(v1.4) => versions/v1.4.0/es}/src/Validator.php | 0 61 files changed, 0 insertions(+), 0 deletions(-) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Attribute.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/ErrorBag.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Helper.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/MimeTypeGuesser.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/MissingRequiredParameterException.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rule.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/RuleNotFoundException.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/RuleQuashException.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Accepted.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/After.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Alpha.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaDash.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaNum.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/AlphaSpaces.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Before.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Between.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Boolean.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Callback.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Date.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Defaults.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Different.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Digits.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/DigitsBetween.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Email.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Extension.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/In.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Integer.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Interfaces/BeforeValidate.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Interfaces/ModifyValue.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ip.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ipv4.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Ipv6.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Json.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Lowercase.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Max.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Mimes.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Min.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/NotIn.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Nullable.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Numeric.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Present.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Regex.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Required.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredIf.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredUnless.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredWith.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredWithAll.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredWithout.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/RequiredWithoutAll.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Same.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Traits/DateUtilsTrait.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Traits/FileTrait.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Traits/SizeTrait.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/TypeArray.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/UploadedFile.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Uppercase.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Rules/Url.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Traits/MessagesTrait.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Traits/TranslationsTrait.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Validation.php (100%) rename translations/{es_(v1.4) => versions/v1.4.0/es}/src/Validator.php (100%) diff --git a/translations/es_(v1.4)/src/Attribute.php b/translations/versions/v1.4.0/es/src/Attribute.php similarity index 100% rename from translations/es_(v1.4)/src/Attribute.php rename to translations/versions/v1.4.0/es/src/Attribute.php diff --git a/translations/es_(v1.4)/src/ErrorBag.php b/translations/versions/v1.4.0/es/src/ErrorBag.php similarity index 100% rename from translations/es_(v1.4)/src/ErrorBag.php rename to translations/versions/v1.4.0/es/src/ErrorBag.php diff --git a/translations/es_(v1.4)/src/Helper.php b/translations/versions/v1.4.0/es/src/Helper.php similarity index 100% rename from translations/es_(v1.4)/src/Helper.php rename to translations/versions/v1.4.0/es/src/Helper.php diff --git a/translations/es_(v1.4)/src/MimeTypeGuesser.php b/translations/versions/v1.4.0/es/src/MimeTypeGuesser.php similarity index 100% rename from translations/es_(v1.4)/src/MimeTypeGuesser.php rename to translations/versions/v1.4.0/es/src/MimeTypeGuesser.php diff --git a/translations/es_(v1.4)/src/MissingRequiredParameterException.php b/translations/versions/v1.4.0/es/src/MissingRequiredParameterException.php similarity index 100% rename from translations/es_(v1.4)/src/MissingRequiredParameterException.php rename to translations/versions/v1.4.0/es/src/MissingRequiredParameterException.php diff --git a/translations/es_(v1.4)/src/Rule.php b/translations/versions/v1.4.0/es/src/Rule.php similarity index 100% rename from translations/es_(v1.4)/src/Rule.php rename to translations/versions/v1.4.0/es/src/Rule.php diff --git a/translations/es_(v1.4)/src/RuleNotFoundException.php b/translations/versions/v1.4.0/es/src/RuleNotFoundException.php similarity index 100% rename from translations/es_(v1.4)/src/RuleNotFoundException.php rename to translations/versions/v1.4.0/es/src/RuleNotFoundException.php diff --git a/translations/es_(v1.4)/src/RuleQuashException.php b/translations/versions/v1.4.0/es/src/RuleQuashException.php similarity index 100% rename from translations/es_(v1.4)/src/RuleQuashException.php rename to translations/versions/v1.4.0/es/src/RuleQuashException.php diff --git a/translations/es_(v1.4)/src/Rules/Accepted.php b/translations/versions/v1.4.0/es/src/Rules/Accepted.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Accepted.php rename to translations/versions/v1.4.0/es/src/Rules/Accepted.php diff --git a/translations/es_(v1.4)/src/Rules/After.php b/translations/versions/v1.4.0/es/src/Rules/After.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/After.php rename to translations/versions/v1.4.0/es/src/Rules/After.php diff --git a/translations/es_(v1.4)/src/Rules/Alpha.php b/translations/versions/v1.4.0/es/src/Rules/Alpha.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Alpha.php rename to translations/versions/v1.4.0/es/src/Rules/Alpha.php diff --git a/translations/es_(v1.4)/src/Rules/AlphaDash.php b/translations/versions/v1.4.0/es/src/Rules/AlphaDash.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/AlphaDash.php rename to translations/versions/v1.4.0/es/src/Rules/AlphaDash.php diff --git a/translations/es_(v1.4)/src/Rules/AlphaNum.php b/translations/versions/v1.4.0/es/src/Rules/AlphaNum.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/AlphaNum.php rename to translations/versions/v1.4.0/es/src/Rules/AlphaNum.php diff --git a/translations/es_(v1.4)/src/Rules/AlphaSpaces.php b/translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/AlphaSpaces.php rename to translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php diff --git a/translations/es_(v1.4)/src/Rules/Before.php b/translations/versions/v1.4.0/es/src/Rules/Before.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Before.php rename to translations/versions/v1.4.0/es/src/Rules/Before.php diff --git a/translations/es_(v1.4)/src/Rules/Between.php b/translations/versions/v1.4.0/es/src/Rules/Between.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Between.php rename to translations/versions/v1.4.0/es/src/Rules/Between.php diff --git a/translations/es_(v1.4)/src/Rules/Boolean.php b/translations/versions/v1.4.0/es/src/Rules/Boolean.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Boolean.php rename to translations/versions/v1.4.0/es/src/Rules/Boolean.php diff --git a/translations/es_(v1.4)/src/Rules/Callback.php b/translations/versions/v1.4.0/es/src/Rules/Callback.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Callback.php rename to translations/versions/v1.4.0/es/src/Rules/Callback.php diff --git a/translations/es_(v1.4)/src/Rules/Date.php b/translations/versions/v1.4.0/es/src/Rules/Date.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Date.php rename to translations/versions/v1.4.0/es/src/Rules/Date.php diff --git a/translations/es_(v1.4)/src/Rules/Defaults.php b/translations/versions/v1.4.0/es/src/Rules/Defaults.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Defaults.php rename to translations/versions/v1.4.0/es/src/Rules/Defaults.php diff --git a/translations/es_(v1.4)/src/Rules/Different.php b/translations/versions/v1.4.0/es/src/Rules/Different.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Different.php rename to translations/versions/v1.4.0/es/src/Rules/Different.php diff --git a/translations/es_(v1.4)/src/Rules/Digits.php b/translations/versions/v1.4.0/es/src/Rules/Digits.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Digits.php rename to translations/versions/v1.4.0/es/src/Rules/Digits.php diff --git a/translations/es_(v1.4)/src/Rules/DigitsBetween.php b/translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/DigitsBetween.php rename to translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php diff --git a/translations/es_(v1.4)/src/Rules/Email.php b/translations/versions/v1.4.0/es/src/Rules/Email.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Email.php rename to translations/versions/v1.4.0/es/src/Rules/Email.php diff --git a/translations/es_(v1.4)/src/Rules/Extension.php b/translations/versions/v1.4.0/es/src/Rules/Extension.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Extension.php rename to translations/versions/v1.4.0/es/src/Rules/Extension.php diff --git a/translations/es_(v1.4)/src/Rules/In.php b/translations/versions/v1.4.0/es/src/Rules/In.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/In.php rename to translations/versions/v1.4.0/es/src/Rules/In.php diff --git a/translations/es_(v1.4)/src/Rules/Integer.php b/translations/versions/v1.4.0/es/src/Rules/Integer.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Integer.php rename to translations/versions/v1.4.0/es/src/Rules/Integer.php diff --git a/translations/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php b/translations/versions/v1.4.0/es/src/Rules/Interfaces/BeforeValidate.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Interfaces/BeforeValidate.php rename to translations/versions/v1.4.0/es/src/Rules/Interfaces/BeforeValidate.php diff --git a/translations/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php b/translations/versions/v1.4.0/es/src/Rules/Interfaces/ModifyValue.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Interfaces/ModifyValue.php rename to translations/versions/v1.4.0/es/src/Rules/Interfaces/ModifyValue.php diff --git a/translations/es_(v1.4)/src/Rules/Ip.php b/translations/versions/v1.4.0/es/src/Rules/Ip.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Ip.php rename to translations/versions/v1.4.0/es/src/Rules/Ip.php diff --git a/translations/es_(v1.4)/src/Rules/Ipv4.php b/translations/versions/v1.4.0/es/src/Rules/Ipv4.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Ipv4.php rename to translations/versions/v1.4.0/es/src/Rules/Ipv4.php diff --git a/translations/es_(v1.4)/src/Rules/Ipv6.php b/translations/versions/v1.4.0/es/src/Rules/Ipv6.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Ipv6.php rename to translations/versions/v1.4.0/es/src/Rules/Ipv6.php diff --git a/translations/es_(v1.4)/src/Rules/Json.php b/translations/versions/v1.4.0/es/src/Rules/Json.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Json.php rename to translations/versions/v1.4.0/es/src/Rules/Json.php diff --git a/translations/es_(v1.4)/src/Rules/Lowercase.php b/translations/versions/v1.4.0/es/src/Rules/Lowercase.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Lowercase.php rename to translations/versions/v1.4.0/es/src/Rules/Lowercase.php diff --git a/translations/es_(v1.4)/src/Rules/Max.php b/translations/versions/v1.4.0/es/src/Rules/Max.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Max.php rename to translations/versions/v1.4.0/es/src/Rules/Max.php diff --git a/translations/es_(v1.4)/src/Rules/Mimes.php b/translations/versions/v1.4.0/es/src/Rules/Mimes.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Mimes.php rename to translations/versions/v1.4.0/es/src/Rules/Mimes.php diff --git a/translations/es_(v1.4)/src/Rules/Min.php b/translations/versions/v1.4.0/es/src/Rules/Min.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Min.php rename to translations/versions/v1.4.0/es/src/Rules/Min.php diff --git a/translations/es_(v1.4)/src/Rules/NotIn.php b/translations/versions/v1.4.0/es/src/Rules/NotIn.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/NotIn.php rename to translations/versions/v1.4.0/es/src/Rules/NotIn.php diff --git a/translations/es_(v1.4)/src/Rules/Nullable.php b/translations/versions/v1.4.0/es/src/Rules/Nullable.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Nullable.php rename to translations/versions/v1.4.0/es/src/Rules/Nullable.php diff --git a/translations/es_(v1.4)/src/Rules/Numeric.php b/translations/versions/v1.4.0/es/src/Rules/Numeric.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Numeric.php rename to translations/versions/v1.4.0/es/src/Rules/Numeric.php diff --git a/translations/es_(v1.4)/src/Rules/Present.php b/translations/versions/v1.4.0/es/src/Rules/Present.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Present.php rename to translations/versions/v1.4.0/es/src/Rules/Present.php diff --git a/translations/es_(v1.4)/src/Rules/Regex.php b/translations/versions/v1.4.0/es/src/Rules/Regex.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Regex.php rename to translations/versions/v1.4.0/es/src/Rules/Regex.php diff --git a/translations/es_(v1.4)/src/Rules/Required.php b/translations/versions/v1.4.0/es/src/Rules/Required.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Required.php rename to translations/versions/v1.4.0/es/src/Rules/Required.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredIf.php b/translations/versions/v1.4.0/es/src/Rules/RequiredIf.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredIf.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredIf.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredUnless.php b/translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredUnless.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredWith.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWith.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredWith.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredWith.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithAll.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredWithAll.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithout.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredWithout.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php diff --git a/translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/RequiredWithoutAll.php rename to translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php diff --git a/translations/es_(v1.4)/src/Rules/Same.php b/translations/versions/v1.4.0/es/src/Rules/Same.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Same.php rename to translations/versions/v1.4.0/es/src/Rules/Same.php diff --git a/translations/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php b/translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Traits/DateUtilsTrait.php rename to translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php diff --git a/translations/es_(v1.4)/src/Rules/Traits/FileTrait.php b/translations/versions/v1.4.0/es/src/Rules/Traits/FileTrait.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Traits/FileTrait.php rename to translations/versions/v1.4.0/es/src/Rules/Traits/FileTrait.php diff --git a/translations/es_(v1.4)/src/Rules/Traits/SizeTrait.php b/translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Traits/SizeTrait.php rename to translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php diff --git a/translations/es_(v1.4)/src/Rules/TypeArray.php b/translations/versions/v1.4.0/es/src/Rules/TypeArray.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/TypeArray.php rename to translations/versions/v1.4.0/es/src/Rules/TypeArray.php diff --git a/translations/es_(v1.4)/src/Rules/UploadedFile.php b/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/UploadedFile.php rename to translations/versions/v1.4.0/es/src/Rules/UploadedFile.php diff --git a/translations/es_(v1.4)/src/Rules/Uppercase.php b/translations/versions/v1.4.0/es/src/Rules/Uppercase.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Uppercase.php rename to translations/versions/v1.4.0/es/src/Rules/Uppercase.php diff --git a/translations/es_(v1.4)/src/Rules/Url.php b/translations/versions/v1.4.0/es/src/Rules/Url.php similarity index 100% rename from translations/es_(v1.4)/src/Rules/Url.php rename to translations/versions/v1.4.0/es/src/Rules/Url.php diff --git a/translations/es_(v1.4)/src/Traits/MessagesTrait.php b/translations/versions/v1.4.0/es/src/Traits/MessagesTrait.php similarity index 100% rename from translations/es_(v1.4)/src/Traits/MessagesTrait.php rename to translations/versions/v1.4.0/es/src/Traits/MessagesTrait.php diff --git a/translations/es_(v1.4)/src/Traits/TranslationsTrait.php b/translations/versions/v1.4.0/es/src/Traits/TranslationsTrait.php similarity index 100% rename from translations/es_(v1.4)/src/Traits/TranslationsTrait.php rename to translations/versions/v1.4.0/es/src/Traits/TranslationsTrait.php diff --git a/translations/es_(v1.4)/src/Validation.php b/translations/versions/v1.4.0/es/src/Validation.php similarity index 100% rename from translations/es_(v1.4)/src/Validation.php rename to translations/versions/v1.4.0/es/src/Validation.php diff --git a/translations/es_(v1.4)/src/Validator.php b/translations/versions/v1.4.0/es/src/Validator.php similarity index 100% rename from translations/es_(v1.4)/src/Validator.php rename to translations/versions/v1.4.0/es/src/Validator.php From d4518aae5508acfa78ea2cc52ce4b95c5045ec1a Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 18:56:06 -0300 Subject: [PATCH 6/7] Translations ES v1.4.0 --- translations/versions/v1.4.0/es/src/Rule.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/Extension.php | 2 +- translations/versions/v1.4.0/es/src/Rules/In.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Mimes.php | 2 +- translations/versions/v1.4.0/es/src/Rules/NotIn.php | 2 +- .../versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php | 2 +- .../versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/UploadedFile.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/translations/versions/v1.4.0/es/src/Rule.php b/translations/versions/v1.4.0/es/src/Rule.php index 16d0e94..6e60571 100644 --- a/translations/versions/v1.4.0/es/src/Rule.php +++ b/translations/versions/v1.4.0/es/src/Rule.php @@ -28,7 +28,7 @@ abstract class Rule protected $fillableParams = []; /** @var string */ - protected $message = "The :attribute is invalid"; + protected $message = ":attribute no es válido."; abstract public function check($value): bool; @@ -225,7 +225,7 @@ protected function requireParameters(array $params) foreach ($params as $param) { if (!isset($this->params[$param])) { $rule = $this->getKey(); - throw new MissingRequiredParameterException("Missing required parameter '{$param}' on rule '{$rule}'"); + throw new MissingRequiredParameterException("Falta el parámetro obligatorio '{$param}' en la regla '{$rule}'"); } } } diff --git a/translations/versions/v1.4.0/es/src/Rules/Extension.php b/translations/versions/v1.4.0/es/src/Rules/Extension.php index ed067a3..dbf61e4 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Extension.php +++ b/translations/versions/v1.4.0/es/src/Rules/Extension.php @@ -40,7 +40,7 @@ public function check($value): bool $allowedExtensions[$key] = ltrim($ext, '.'); } - $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; $allowedExtensionsText = Helper::join(Helper::wraps($allowedExtensions, ".", ""), ', ', ", {$or} "); $this->setParameterText('allowed_extensions', $allowedExtensionsText); diff --git a/translations/versions/v1.4.0/es/src/Rules/In.php b/translations/versions/v1.4.0/es/src/Rules/In.php index f82965c..3d56846 100644 --- a/translations/versions/v1.4.0/es/src/Rules/In.php +++ b/translations/versions/v1.4.0/es/src/Rules/In.php @@ -52,7 +52,7 @@ public function check($value): bool $allowedValues = $this->parameter('allowed_values'); - $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; $allowedValuesText = Helper::join(Helper::wraps($allowedValues, "'"), ', ', ", {$or} "); $this->setParameterText('allowed_values', $allowedValuesText); diff --git a/translations/versions/v1.4.0/es/src/Rules/Mimes.php b/translations/versions/v1.4.0/es/src/Rules/Mimes.php index 35c1ae9..743d441 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Mimes.php +++ b/translations/versions/v1.4.0/es/src/Rules/Mimes.php @@ -62,7 +62,7 @@ public function check($value): bool $allowedTypes = $this->parameter('allowed_types'); if ($allowedTypes) { - $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); } diff --git a/translations/versions/v1.4.0/es/src/Rules/NotIn.php b/translations/versions/v1.4.0/es/src/Rules/NotIn.php index fb3c78b..2e17fbe 100644 --- a/translations/versions/v1.4.0/es/src/Rules/NotIn.php +++ b/translations/versions/v1.4.0/es/src/Rules/NotIn.php @@ -52,7 +52,7 @@ public function check($value): bool $disallowedValues = (array) $this->parameter('disallowed_values'); - $and = $this->validation ? $this->validation->getTranslation('and') : 'and'; + $and = $this->validation ? $this->validation->getTranslation('and') : 'y'; $disallowedValuesText = Helper::join(Helper::wraps($disallowedValues, "'"), ', ', ", {$and} "); $this->setParameterText('disallowed_values', $disallowedValuesText); diff --git a/translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php b/translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php index af33d71..c2fc887 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php +++ b/translations/versions/v1.4.0/es/src/Rules/Traits/DateUtilsTrait.php @@ -27,7 +27,7 @@ protected function isValidDate(string $date): bool protected function throwException(string $value) { // phpcs:ignore - return new Exception("Expected a valid date, got '{$value}' instead. 2016-12-08, 2016-12-02 14:58, tomorrow are considered valid dates"); + return new Exception("Se esperaba una fecha válida, se obtuvo '{$value}'. 2016-12-08, 2016-12-02 14:58, tomorrow se consideran fechas válidas."); } /** diff --git a/translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php b/translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php index 9ada7f5..f3658d5 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php +++ b/translations/versions/v1.4.0/es/src/Rules/Traits/SizeTrait.php @@ -49,11 +49,11 @@ protected function getBytesSize($size) } if (!is_string($size)) { - throw new InvalidArgumentException("Size must be string or numeric Bytes", 1); + throw new InvalidArgumentException("El tamaño debe ser una cadena o bytes numéricos.", 1); } if (!preg_match("/^(?((\d+)?\.)?\d+)(?(B|K|M|G|T|P)B?)?$/i", $size, $match)) { - throw new InvalidArgumentException("Size is not valid format", 1); + throw new InvalidArgumentException("El tamaño no es un formato válido.", 1); } $number = (float) $match['number']; diff --git a/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php b/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php index ba2dc4c..80a733b 100644 --- a/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php +++ b/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php @@ -134,7 +134,7 @@ public function check($value): bool $allowedTypes = $this->parameter('allowed_types'); if ($allowedTypes) { - $or = $this->validation ? $this->validation->getTranslation('or') : 'or'; + $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); } From 9b705c9d360cad76ee022984bea09304c92558a6 Mon Sep 17 00:00:00 2001 From: PolyCoffees Date: Mon, 31 Aug 2020 19:19:33 -0300 Subject: [PATCH 7/7] Translations ES v1.4.0 --- translations/versions/v1.4.0/es/src/Rules/Accepted.php | 2 +- translations/versions/v1.4.0/es/src/Rules/After.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Alpha.php | 2 +- translations/versions/v1.4.0/es/src/Rules/AlphaDash.php | 2 +- translations/versions/v1.4.0/es/src/Rules/AlphaNum.php | 2 +- translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Before.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Between.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Boolean.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Callback.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Date.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Defaults.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Different.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Digits.php | 2 +- translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Email.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Extension.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/In.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/Integer.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Ip.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Ipv4.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Ipv6.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Json.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Lowercase.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Max.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Mimes.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/Min.php | 2 +- translations/versions/v1.4.0/es/src/Rules/NotIn.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/Numeric.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Present.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Regex.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Required.php | 2 +- translations/versions/v1.4.0/es/src/Rules/RequiredIf.php | 2 +- translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php | 2 +- translations/versions/v1.4.0/es/src/Rules/RequiredWith.php | 2 +- translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php | 2 +- translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php | 2 +- .../versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Same.php | 2 +- translations/versions/v1.4.0/es/src/Rules/TypeArray.php | 2 +- translations/versions/v1.4.0/es/src/Rules/UploadedFile.php | 4 ++-- translations/versions/v1.4.0/es/src/Rules/Uppercase.php | 2 +- translations/versions/v1.4.0/es/src/Rules/Url.php | 2 +- translations/versions/v1.4.0/es/src/Validation.php | 2 +- translations/versions/v1.4.0/es/src/Validator.php | 2 +- 45 files changed, 50 insertions(+), 50 deletions(-) diff --git a/translations/versions/v1.4.0/es/src/Rules/Accepted.php b/translations/versions/v1.4.0/es/src/Rules/Accepted.php index 394387b..e38b33b 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Accepted.php +++ b/translations/versions/v1.4.0/es/src/Rules/Accepted.php @@ -10,7 +10,7 @@ class Accepted extends Rule protected $implicit = true; /** @var string */ - protected $message = ":attribute debe ser aceptado."; + protected $message = "El campo :attribute debe ser aceptado."; /** * Check the $value is accepted diff --git a/translations/versions/v1.4.0/es/src/Rules/After.php b/translations/versions/v1.4.0/es/src/Rules/After.php index a1d1e0f..fc1bf1f 100644 --- a/translations/versions/v1.4.0/es/src/Rules/After.php +++ b/translations/versions/v1.4.0/es/src/Rules/After.php @@ -9,7 +9,7 @@ class After extends Rule use Traits\DateUtilsTrait; /** @var string */ - protected $message = ":attribute debe ser una fecha posterior a :time."; + protected $message = "El campo :attribute debe ser una fecha posterior a :time."; /** @var array */ protected $fillableParams = ['time']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Alpha.php b/translations/versions/v1.4.0/es/src/Rules/Alpha.php index 503d648..b921369 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Alpha.php +++ b/translations/versions/v1.4.0/es/src/Rules/Alpha.php @@ -8,7 +8,7 @@ class Alpha extends Rule { /** @var string */ - protected $message = ":attribute solo permite caracteres alfabéticos."; + protected $message = "El campo :attribute solo permite caracteres alfabéticos."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/AlphaDash.php b/translations/versions/v1.4.0/es/src/Rules/AlphaDash.php index eb70afd..b54ceab 100644 --- a/translations/versions/v1.4.0/es/src/Rules/AlphaDash.php +++ b/translations/versions/v1.4.0/es/src/Rules/AlphaDash.php @@ -8,7 +8,7 @@ class AlphaDash extends Rule { /** @var string */ - protected $message = ":attribute solo permite a-z, 0-9, _ y -."; + protected $message = "El campo :attribute solo permite a-z, 0-9, _ y -."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/AlphaNum.php b/translations/versions/v1.4.0/es/src/Rules/AlphaNum.php index 4b63a4b..1dbc91a 100644 --- a/translations/versions/v1.4.0/es/src/Rules/AlphaNum.php +++ b/translations/versions/v1.4.0/es/src/Rules/AlphaNum.php @@ -8,7 +8,7 @@ class AlphaNum extends Rule { /** @var string */ - protected $message = ":attribute solo permite caracteres alfanuméricos."; + protected $message = "El campo :attribute solo permite caracteres alfanuméricos."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php b/translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php index 486b494..8150002 100644 --- a/translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php +++ b/translations/versions/v1.4.0/es/src/Rules/AlphaSpaces.php @@ -8,7 +8,7 @@ class AlphaSpaces extends Rule { /** @var string */ - protected $message = ":attribute solo permite caracteres alfabéticos y espacios."; + protected $message = "El campo :attribute solo permite caracteres alfabéticos y espacios."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Before.php b/translations/versions/v1.4.0/es/src/Rules/Before.php index 68bb7d0..040c3be 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Before.php +++ b/translations/versions/v1.4.0/es/src/Rules/Before.php @@ -9,7 +9,7 @@ class Before extends Rule use Traits\DateUtilsTrait; /** @var string */ - protected $message = ":attribute debe ser una fecha anterior a :time."; + protected $message = "El campo :attribute debe ser una fecha anterior a :time."; /** @var array */ protected $fillableParams = ['time']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Between.php b/translations/versions/v1.4.0/es/src/Rules/Between.php index d9bfab0..051c616 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Between.php +++ b/translations/versions/v1.4.0/es/src/Rules/Between.php @@ -9,7 +9,7 @@ class Between extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = ":attribute debe estar entre :min y :max."; + protected $message = "El campo :attribute debe estar entre :min y :max."; /** @var array */ protected $fillableParams = ['min', 'max']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Boolean.php b/translations/versions/v1.4.0/es/src/Rules/Boolean.php index 6b31d24..483280a 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Boolean.php +++ b/translations/versions/v1.4.0/es/src/Rules/Boolean.php @@ -7,7 +7,7 @@ class Boolean extends Rule { /** @var string */ - protected $message = ":attribute debe ser un booleano."; + protected $message = "El campo :attribute debe ser un booleano."; /** * Check the value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Callback.php b/translations/versions/v1.4.0/es/src/Rules/Callback.php index 18f64f6..67b9274 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Callback.php +++ b/translations/versions/v1.4.0/es/src/Rules/Callback.php @@ -10,7 +10,7 @@ class Callback extends Rule { /** @var string */ - protected $message = ":attribute no es válido."; + protected $message = "El campo :attribute no es válido."; /** @var array */ protected $fillableParams = ['callback']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Date.php b/translations/versions/v1.4.0/es/src/Rules/Date.php index b371ae5..7429935 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Date.php +++ b/translations/versions/v1.4.0/es/src/Rules/Date.php @@ -8,7 +8,7 @@ class Date extends Rule { /** @var string */ - protected $message = ":attribute no es un formato de fecha válido."; + protected $message = "El campo :attribute no es un formato de fecha válido."; /** @var array */ protected $fillableParams = ['format']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Defaults.php b/translations/versions/v1.4.0/es/src/Rules/Defaults.php index 918b246..8a6014f 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Defaults.php +++ b/translations/versions/v1.4.0/es/src/Rules/Defaults.php @@ -9,7 +9,7 @@ class Defaults extends Rule implements ModifyValue { /** @var string */ - protected $message = ":attribute por defecto es :default."; + protected $message = "El campo :attribute por defecto es :default."; /** @var array */ protected $fillableParams = ['default']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Different.php b/translations/versions/v1.4.0/es/src/Rules/Different.php index 47f5286..225337e 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Different.php +++ b/translations/versions/v1.4.0/es/src/Rules/Different.php @@ -8,7 +8,7 @@ class Different extends Rule { /** @var string */ - protected $message = ":attribute debe ser diferente de :field."; + protected $message = "El campo :attribute debe ser diferente de :field."; /** @var array */ protected $fillableParams = ['field']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Digits.php b/translations/versions/v1.4.0/es/src/Rules/Digits.php index 80c3ffe..3c3dc38 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Digits.php +++ b/translations/versions/v1.4.0/es/src/Rules/Digits.php @@ -8,7 +8,7 @@ class Digits extends Rule { /** @var string */ - protected $message = ":attribute debe ser numérico y debe tener una longitud exacta de :length."; + protected $message = "El campo :attribute debe ser numérico y debe tener una longitud exacta de :length."; /** @var array */ protected $fillableParams = ['length']; diff --git a/translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php b/translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php index 9241c9d..f4a150f 100644 --- a/translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php +++ b/translations/versions/v1.4.0/es/src/Rules/DigitsBetween.php @@ -8,7 +8,7 @@ class DigitsBetween extends Rule { /** @var string */ - protected $message = ":attribute debe tener una longitud entre :min y :max."; + protected $message = "El campo :attribute debe tener una longitud entre :min y :max."; /** @var array */ protected $fillableParams = ['min', 'max']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Email.php b/translations/versions/v1.4.0/es/src/Rules/Email.php index 3ded6de..93aae18 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Email.php +++ b/translations/versions/v1.4.0/es/src/Rules/Email.php @@ -8,7 +8,7 @@ class Email extends Rule { /** @var string */ - protected $message = ":attribute no es un correo electrónico válido."; + protected $message = "El campo :attribute no es un correo electrónico válido."; /** * Check $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Extension.php b/translations/versions/v1.4.0/es/src/Rules/Extension.php index dbf61e4..157d888 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Extension.php +++ b/translations/versions/v1.4.0/es/src/Rules/Extension.php @@ -9,7 +9,7 @@ class Extension extends Rule { /** @var string */ - protected $message = ":attribute debe ser un :allowed_extensions archivo."; + protected $message = "El campo :attribute debe ser un :allowed_extensions archivo."; /** * Given $params and assign the $this->params @@ -40,7 +40,7 @@ public function check($value): bool $allowedExtensions[$key] = ltrim($ext, '.'); } - $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; + $or = $this->validation ? $this->validation->getTranslation('o') : 'o'; $allowedExtensionsText = Helper::join(Helper::wraps($allowedExtensions, ".", ""), ', ', ", {$or} "); $this->setParameterText('allowed_extensions', $allowedExtensionsText); diff --git a/translations/versions/v1.4.0/es/src/Rules/In.php b/translations/versions/v1.4.0/es/src/Rules/In.php index 3d56846..d3b4d12 100644 --- a/translations/versions/v1.4.0/es/src/Rules/In.php +++ b/translations/versions/v1.4.0/es/src/Rules/In.php @@ -9,7 +9,7 @@ class In extends Rule { /** @var string */ - protected $message = ":attribute solo permite :allowed_values."; + protected $message = "El campo :attribute solo permite :allowed_values."; /** @var bool */ protected $strict = false; @@ -52,7 +52,7 @@ public function check($value): bool $allowedValues = $this->parameter('allowed_values'); - $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; + $or = $this->validation ? $this->validation->getTranslation('o') : 'o'; $allowedValuesText = Helper::join(Helper::wraps($allowedValues, "'"), ', ', ", {$or} "); $this->setParameterText('allowed_values', $allowedValuesText); diff --git a/translations/versions/v1.4.0/es/src/Rules/Integer.php b/translations/versions/v1.4.0/es/src/Rules/Integer.php index ebe484f..bafb6a1 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Integer.php +++ b/translations/versions/v1.4.0/es/src/Rules/Integer.php @@ -8,7 +8,7 @@ class Integer extends Rule { /** @var string */ - protected $message = ":attribute debe ser un número entero."; + protected $message = "El campo :attribute debe ser un número entero."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Ip.php b/translations/versions/v1.4.0/es/src/Rules/Ip.php index 86368f2..b9cc2c8 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Ip.php +++ b/translations/versions/v1.4.0/es/src/Rules/Ip.php @@ -8,7 +8,7 @@ class Ip extends Rule { /** @var string */ - protected $message = ":attribute no es una dirección IP válida."; + protected $message = "El campo :attribute no es una dirección IP válida."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Ipv4.php b/translations/versions/v1.4.0/es/src/Rules/Ipv4.php index 87503d3..c5bb7c1 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Ipv4.php +++ b/translations/versions/v1.4.0/es/src/Rules/Ipv4.php @@ -8,7 +8,7 @@ class Ipv4 extends Rule { /** @var string */ - protected $message = ":attribute no es una dirección IPv4 válida."; + protected $message = "El campo :attribute no es una dirección IPv4 válida."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Ipv6.php b/translations/versions/v1.4.0/es/src/Rules/Ipv6.php index 20e38f3..a5de632 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Ipv6.php +++ b/translations/versions/v1.4.0/es/src/Rules/Ipv6.php @@ -8,7 +8,7 @@ class Ipv6 extends Rule { /** @var string */ - protected $message = ":attribute no es una dirección IPv6 válida."; + protected $message = "El campo :attribute no es una dirección IPv6 válida."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Json.php b/translations/versions/v1.4.0/es/src/Rules/Json.php index fdfc003..13cc26a 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Json.php +++ b/translations/versions/v1.4.0/es/src/Rules/Json.php @@ -8,7 +8,7 @@ class Json extends Rule { /** @var string */ - protected $message = ":attribute debe ser un JSON válido."; + protected $message = "El campo :attribute debe ser un JSON válido."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Lowercase.php b/translations/versions/v1.4.0/es/src/Rules/Lowercase.php index 65d720d..93f253a 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Lowercase.php +++ b/translations/versions/v1.4.0/es/src/Rules/Lowercase.php @@ -8,7 +8,7 @@ class Lowercase extends Rule { /** @var string */ - protected $message = ":attribute debe estar en minúsculas."; + protected $message = "El campo :attribute debe estar en minúsculas."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Max.php b/translations/versions/v1.4.0/es/src/Rules/Max.php index c969f0c..007e280 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Max.php +++ b/translations/versions/v1.4.0/es/src/Rules/Max.php @@ -9,7 +9,7 @@ class Max extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = ":attribute el máximo es :max."; + protected $message = "El campo :attribute el máximo es :max."; /** @var array */ protected $fillableParams = ['max']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Mimes.php b/translations/versions/v1.4.0/es/src/Rules/Mimes.php index 743d441..8820b5b 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Mimes.php +++ b/translations/versions/v1.4.0/es/src/Rules/Mimes.php @@ -11,7 +11,7 @@ class Mimes extends Rule use Traits\FileTrait; /** @var string */ - protected $message = ":attribute el tipo de archivo debe ser :allowed_types."; + protected $message = "El campo :attribute el tipo de archivo debe ser :allowed_types."; /** @var string|int */ protected $maxSize = null; @@ -62,7 +62,7 @@ public function check($value): bool $allowedTypes = $this->parameter('allowed_types'); if ($allowedTypes) { - $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; + $or = $this->validation ? $this->validation->getTranslation('o') : 'o'; $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); } diff --git a/translations/versions/v1.4.0/es/src/Rules/Min.php b/translations/versions/v1.4.0/es/src/Rules/Min.php index d7d1818..ba9e244 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Min.php +++ b/translations/versions/v1.4.0/es/src/Rules/Min.php @@ -9,7 +9,7 @@ class Min extends Rule use Traits\SizeTrait; /** @var string */ - protected $message = ":attribute el mínimo es :min."; + protected $message = "El campo :attribute el mínimo es :min."; /** @var array */ protected $fillableParams = ['min']; diff --git a/translations/versions/v1.4.0/es/src/Rules/NotIn.php b/translations/versions/v1.4.0/es/src/Rules/NotIn.php index 2e17fbe..c3e42e6 100644 --- a/translations/versions/v1.4.0/es/src/Rules/NotIn.php +++ b/translations/versions/v1.4.0/es/src/Rules/NotIn.php @@ -9,7 +9,7 @@ class NotIn extends Rule { /** @var string */ - protected $message = ":attribute no está permitiendo :disallowed_values."; + protected $message = "El campo :attribute no está permitiendo :disallowed_values."; /** @var bool */ protected $strict = false; @@ -52,7 +52,7 @@ public function check($value): bool $disallowedValues = (array) $this->parameter('disallowed_values'); - $and = $this->validation ? $this->validation->getTranslation('and') : 'y'; + $and = $this->validation ? $this->validation->getTranslation('y') : 'y'; $disallowedValuesText = Helper::join(Helper::wraps($disallowedValues, "'"), ', ', ", {$and} "); $this->setParameterText('disallowed_values', $disallowedValuesText); diff --git a/translations/versions/v1.4.0/es/src/Rules/Numeric.php b/translations/versions/v1.4.0/es/src/Rules/Numeric.php index c2c1d15..1d81fe5 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Numeric.php +++ b/translations/versions/v1.4.0/es/src/Rules/Numeric.php @@ -8,7 +8,7 @@ class Numeric extends Rule { /** @var string */ - protected $message = ":attribute debe ser numérico."; + protected $message = "El campo :attribute debe ser numérico."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Present.php b/translations/versions/v1.4.0/es/src/Rules/Present.php index d78f85d..ff84393 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Present.php +++ b/translations/versions/v1.4.0/es/src/Rules/Present.php @@ -10,7 +10,7 @@ class Present extends Rule protected $implicit = true; /** @var string */ - protected $message = ":attribute debe estar presente."; + protected $message = "El campo :attribute debe estar presente."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Regex.php b/translations/versions/v1.4.0/es/src/Rules/Regex.php index b1ec252..ef5a148 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Regex.php +++ b/translations/versions/v1.4.0/es/src/Rules/Regex.php @@ -8,7 +8,7 @@ class Regex extends Rule { /** @var string */ - protected $message = ":attribute no es un formato válido."; + protected $message = "El campo :attribute no es un formato válido."; /** @var array */ protected $fillableParams = ['regex']; diff --git a/translations/versions/v1.4.0/es/src/Rules/Required.php b/translations/versions/v1.4.0/es/src/Rules/Required.php index 655bf07..305429b 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Required.php +++ b/translations/versions/v1.4.0/es/src/Rules/Required.php @@ -12,7 +12,7 @@ class Required extends Rule protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredIf.php b/translations/versions/v1.4.0/es/src/Rules/RequiredIf.php index adbd20d..4e999aa 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredIf.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredIf.php @@ -10,7 +10,7 @@ class RequiredIf extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign the $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php b/translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php index dfea270..4680000 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredUnless.php @@ -10,7 +10,7 @@ class RequiredUnless extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign the $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredWith.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWith.php index 4cf0083..90a244a 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredWith.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredWith.php @@ -10,7 +10,7 @@ class RequiredWith extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php index 3c9678d..967a025 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredWithAll.php @@ -10,7 +10,7 @@ class RequiredWithAll extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php index 4c4ac4f..21bfd90 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredWithout.php @@ -10,7 +10,7 @@ class RequiredWithout extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php b/translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php index 4332ac2..618ca98 100644 --- a/translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php +++ b/translations/versions/v1.4.0/es/src/Rules/RequiredWithoutAll.php @@ -10,7 +10,7 @@ class RequiredWithoutAll extends Required protected $implicit = true; /** @var string */ - protected $message = ":attribute es requerido."; + protected $message = "El campo :attribute es requerido."; /** * Given $params and assign $this->params diff --git a/translations/versions/v1.4.0/es/src/Rules/Same.php b/translations/versions/v1.4.0/es/src/Rules/Same.php index f863960..89472d3 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Same.php +++ b/translations/versions/v1.4.0/es/src/Rules/Same.php @@ -8,7 +8,7 @@ class Same extends Rule { /** @var string */ - protected $message = ":attribute debe ser lo mismo con :field."; + protected $message = "El campo :attribute debe ser lo mismo con :field."; /** @var array */ protected $fillableParams = ['field']; diff --git a/translations/versions/v1.4.0/es/src/Rules/TypeArray.php b/translations/versions/v1.4.0/es/src/Rules/TypeArray.php index 2e3d8b7..ac672d2 100644 --- a/translations/versions/v1.4.0/es/src/Rules/TypeArray.php +++ b/translations/versions/v1.4.0/es/src/Rules/TypeArray.php @@ -8,7 +8,7 @@ class TypeArray extends Rule { /** @var string */ - protected $message = ":attribute debe ser una matriz."; + protected $message = "El campo :attribute debe ser una matriz."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php b/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php index 80a733b..3f3c940 100644 --- a/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php +++ b/translations/versions/v1.4.0/es/src/Rules/UploadedFile.php @@ -12,7 +12,7 @@ class UploadedFile extends Rule implements BeforeValidate use Traits\FileTrait, Traits\SizeTrait; /** @var string */ - protected $message = ":attribute no es un archivo subido válido."; + protected $message = "El campo :attribute no es un archivo subido válido."; /** @var string|int */ protected $maxSize = null; @@ -134,7 +134,7 @@ public function check($value): bool $allowedTypes = $this->parameter('allowed_types'); if ($allowedTypes) { - $or = $this->validation ? $this->validation->getTranslation('or') : 'o'; + $or = $this->validation ? $this->validation->getTranslation('o') : 'o'; $this->setParameterText('allowed_types', Helper::join(Helper::wraps($allowedTypes, "'"), ', ', ", {$or} ")); } diff --git a/translations/versions/v1.4.0/es/src/Rules/Uppercase.php b/translations/versions/v1.4.0/es/src/Rules/Uppercase.php index f15091e..cbf50d5 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Uppercase.php +++ b/translations/versions/v1.4.0/es/src/Rules/Uppercase.php @@ -8,7 +8,7 @@ class Uppercase extends Rule { /** @var string */ - protected $message = ":attribute debe estar en mayúsculas."; + protected $message = "El campo :attribute debe estar en mayúsculas."; /** * Check the $value is valid diff --git a/translations/versions/v1.4.0/es/src/Rules/Url.php b/translations/versions/v1.4.0/es/src/Rules/Url.php index 190a469..1f9cd7c 100644 --- a/translations/versions/v1.4.0/es/src/Rules/Url.php +++ b/translations/versions/v1.4.0/es/src/Rules/Url.php @@ -8,7 +8,7 @@ class Url extends Rule { /** @var string */ - protected $message = ":attribute no es una URL válida."; + protected $message = "El campo :attribute no es una URL válida."; /** * Given $params and assign $this->params diff --git a/translations/versions/v1.4.0/es/src/Validation.php b/translations/versions/v1.4.0/es/src/Validation.php index d74786a..4ae725b 100644 --- a/translations/versions/v1.4.0/es/src/Validation.php +++ b/translations/versions/v1.4.0/es/src/Validation.php @@ -498,7 +498,7 @@ protected function resolveRules($rules): array $validator = call_user_func_array($validatorFactory, ['callback', $rule]); } else { $ruleName = is_object($rule) ? get_class($rule) : gettype($rule); - $message = "Rule must be a string, Closure or '".Rule::class."' instance. ".$ruleName." given"; + $message = "La regla debe ser un String, Closure o una instancia de '".Rule::class."'. ".$ruleName." obtenido."; throw new \Exception(); } diff --git a/translations/versions/v1.4.0/es/src/Validator.php b/translations/versions/v1.4.0/es/src/Validator.php index dfa19c5..adb8c24 100644 --- a/translations/versions/v1.4.0/es/src/Validator.php +++ b/translations/versions/v1.4.0/es/src/Validator.php @@ -180,7 +180,7 @@ public function addValidator(string $ruleName, Rule $rule) { if (!$this->allowRuleOverride && array_key_exists($ruleName, $this->validators)) { throw new RuleQuashException( - "You cannot override a built in rule. You have to rename your rule" + "No puede anular una regla incorporada. Tienes que cambiar el nombre de tu regla." ); }