Files
opnform-host-nginx/api/resources/lang/ur/validation.php
Chirag Chhatrala d7ce8536c8 Add reCAPTCHA support and update captcha provider handling (#647)
* Add reCAPTCHA support and update captcha provider handling

- Introduced reCAPTCHA as an additional captcha provider alongside hCaptcha.
- Updated form request validation to handle different captcha providers based on user selection.
- Added a new validation rule for reCAPTCHA.
- Modified the forms model to include a 'captcha_provider' field.
- Created a migration to add the 'captcha_provider' column to the forms table.
- Updated frontend components to support dynamic rendering of captcha based on the selected provider.
- Enhanced tests to cover scenarios for both hCaptcha and reCAPTCHA.

These changes improve the flexibility of captcha options available to users, enhancing form security and user experience.

* fix pint

* change comment text

* Refactor captcha implementation and integrate new captcha components

- Removed the old RecaptchaV2 component and replaced it with a new implementation that supports both reCAPTCHA and hCaptcha through a unified CaptchaInput component.
- Updated the OpenForm component to utilize the new CaptchaInput for dynamic captcha rendering based on user-selected provider.
- Cleaned up the package.json by removing the deprecated @hcaptcha/vue3-hcaptcha dependency.
- Enhanced form initialization to set a default captcha provider.
- Improved error handling and cleanup for both reCAPTCHA and hCaptcha scripts.

These changes streamline captcha integration, improve maintainability, and enhance user experience by providing a more flexible captcha solution.

* Refactor captcha error messages and localization support

* Refactor registration process to integrate reCAPTCHA

- Replaced hCaptcha implementation with reCAPTCHA in RegisterController and related test cases.
- Updated validation rules to utilize g-recaptcha-response instead of h-captcha-response.
- Modified RegisterForm component to support reCAPTCHA, including changes to the form data structure and component references.
- Enhanced test cases to reflect the new reCAPTCHA integration, ensuring proper validation and response handling.

These changes improve security and user experience during the registration process by adopting a more widely used captcha solution.

* Fix reCAPTCHA configuration and update RegisterForm styling

- Corrected the configuration key for reCAPTCHA in RegisterController from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key'.
- Updated the styling of the Captcha input section in RegisterForm.vue to improve layout consistency.

These changes ensure proper reCAPTCHA functionality and enhance the user interface during the registration process.

* Fix reCAPTCHA configuration in RegisterTest to use the correct key format

- Updated the configuration key for reCAPTCHA in RegisterTest from 'services.recaptcha.secret_key' to 'services.re_captcha.secret_key' to ensure proper functionality during tests.

This change aligns the test setup with the recent updates in the reCAPTCHA integration, improving the accuracy of the registration process tests.

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-18 16:35:09 +01:00

122 lines
9.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
return [
'accepted' => ':attribute کو قبول کرنا ضروری ہے۔',
'active_url' => ':attribute درست URL نہیں ہے۔',
'after' => ':attribute لازمی طور پر :date کے بعد کی تاریخ ہونی چاہیے۔',
'after_or_equal' => ':attribute لازمی طور پر :date کے بعد یا اس کے برابر کی تاریخ ہونی چاہیے۔',
'alpha' => ':attribute میں صرف حروف شامل ہو سکتے ہیں۔',
'alpha_dash' => ':attribute میں صرف حروف، نمبر، ڈیش اور انڈر سکور شامل ہو سکتے ہیں۔',
'alpha_num' => ':attribute میں صرف حروف اور نمبر شامل ہو سکتے ہیں۔',
'array' => ':attribute لازمی طور پر ایک آرے ہونا چاہیے۔',
'before' => ':attribute لازمی طور پر :date سے پہلے کی تاریخ ہونی چاہیے۔',
'before_or_equal' => ':attribute لازمی طور پر :date سے پہلے یا اس کے برابر کی تاریخ ہونی چاہیے۔',
'between' => [
'numeric' => ':attribute لازمی طور پر :min اور :max کے درمیان ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :min اور :max کلوبائٹس کے درمیان ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :min اور :max حروف کے درمیان ہونا چاہیے۔',
'array' => ':attribute لازمی طور پر :min اور :max آئٹمز کے درمیان ہونا چاہیے۔',
],
'boolean' => ':attribute فیلڈ صرف درست یا غلط ہو سکتی ہے۔',
'confirmed' => ':attribute کی تصدیق مماثل نہیں ہے۔',
'date' => ':attribute درست تاریخ نہیں ہے۔',
'date_equals' => ':attribute لازمی طور پر :date کے برابر تاریخ ہونی چاہیے۔',
'date_format' => ':attribute فارمیٹ :format سے مماثل نہیں ہے۔',
'different' => ':attribute اور :other مختلف ہونے چاہئیں۔',
'digits' => ':attribute لازمی طور پر :digits ہندسے ہونے چاہئیں۔',
'digits_between' => ':attribute لازمی طور پر :min اور :max ہندسوں کے درمیان ہونا چاہیے۔',
'dimensions' => ':attribute کی تصویر کی غلط ڈائمنشنز ہیں۔',
'distinct' => ':attribute فیلڈ میں ڈپلیکیٹ ویلیو ہے۔',
'email' => ':attribute لازمی طور پر درست ای میل ایڈریس ہونا چاہیے۔',
'ends_with' => ':attribute کا اختتام ان میں سے کسی ایک پر ہونا چاہیے: :values۔',
'exists' => 'منتخب کردہ :attribute درست نہیں ہے۔',
'file' => ':attribute لازمی طور پر ایک فائل ہونی چاہیے۔',
'filled' => ':attribute فیلڈ میں ویلیو ہونی چاہیے۔',
'gt' => [
'numeric' => ':attribute لازمی طور پر :value سے بڑا ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :value کلوبائٹس سے بڑا ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :value حروف سے بڑا ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر :value سے زیادہ آئٹمز ہونی چاہئیں۔',
],
'gte' => [
'numeric' => ':attribute لازمی طور پر :value سے بڑا یا برابر ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :value کلوبائٹس سے بڑا یا برابر ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :value حروف سے بڑا یا برابر ہونا چاہیے۔',
'array' => ':attribute میں لا<D984><D8A7>می طور پر :value یا اس سے زیادہ آئٹمز ہونی چاہئیں۔',
],
'image' => ':attribute لازمی طور پر ایک تصویر ہونی چاہیے۔',
'in' => 'منتخب کردہ :attribute درست نہیں ہے۔',
'in_array' => ':attribute فیلڈ :other میں موجود نہیں ہے۔',
'integer' => ':attribute لازمی طور پر ایک عدد صحیح ہونا چاہیے۔',
'ip' => ':attribute لازمی طور پر درست IP ایڈریس ہونا چاہیے۔',
'ipv4' => ':attribute لازمی طور پر درست IPv4 ایڈریس ہونا چاہیے۔',
'ipv6' => ':attribute لازمی طور پر درست IPv6 ایڈریس ہونا چاہیے۔',
'json' => ':attribute لازمی طور پر درست JSON سٹرنگ ہونی چاہیے۔',
'lt' => [
'numeric' => ':attribute لازمی طور پر :value سے چھوٹا ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :value کلوبائٹس سے چھوٹا ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :value حروف سے چھوٹا ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر :value سے کم آئٹمز ہونی چاہئیں۔',
],
'lte' => [
'numeric' => ':attribute لازم<D8B2><D985> طور پر :value سے چھوٹا یا برابر ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :value کلوبائٹس سے چھوٹا یا برابر ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :value حروف سے چھوٹا یا برابر ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر :value سے زیادہ آئٹمز نہیں ہونی چاہئیں۔',
],
'max' => [
'numeric' => ':attribute لازمی طور پر :max سے بڑا نہیں ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :max کلوبائٹس سے بڑا نہیں ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :max حروف سے بڑا نہیں ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر :max سے زیادہ آئٹمز نہیں ہونی چاہئیں۔',
],
'mimes' => ':attribute لازمی طور پر :values قسم کی فائل ہونی چاہیے۔',
'mimetypes' => ':attribute لازمی طور پر :values قسم کی فائل ہونی چاہیے۔',
'min' => [
'numeric' => ':attribute لازمی طور پر کم از کم :min ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر کم از کم :min <20><>لوبائٹس ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر کم از کم :min حروف ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر کم از کم :min آئٹمز ہونی چاہئیں۔',
],
'multiple_of' => ':attribute لازمی طور پر :value کا ضرب ہونا چاہیے',
'not_in' => 'منتخب کردہ :attribute درست نہیں ہے۔',
'not_regex' => ':attribute فارمیٹ درست نہیں ہے۔',
'numeric' => ':attribute لازمی طور پر ایک نمبر ہونا چاہیے۔',
'password' => 'پاس ورڈ غلط ہے۔',
'present' => ':attribute فیلڈ موجود ہونی چاہیے۔',
'regex' => ':attribute فارمیٹ درست نہیں ہے۔',
'required' => ':attribute فیلڈ درکار ہے۔',
'required_if' => ':attribute فیلڈ درکار ہے جب :other :value ہو۔',
'required_unless' => ':attribute فیلڈ درکار ہے جب تک :other :values میں نہ ہو۔',
'required_with' => ':attribute فیلڈ درکار ہے جب :values موجود ہو۔',
'required_with_all' => ':attribute فیلڈ درکار ہے جب :values موجود ہوں۔',
'required_without' => ':attribute فیلڈ درکار ہے جب :values موجود نہ ہو۔',
'required_without_all' => ':attribute فیلڈ درکار ہے جب :values میں سے کوئی بھی موجود نہ ہو۔',
'same' => ':attribute اور :other مماثل ہونے چاہئیں۔',
'size' => [
'numeric' => ':attribute لازمی طور پر :size ہونا چاہیے۔',
'file' => ':attribute لازمی طور پر :size کلوبائٹس ہونا چاہیے۔',
'string' => ':attribute لازمی طور پر :size حروف ہونا چاہیے۔',
'array' => ':attribute میں لازمی طور پر :size آئٹمز ہونی چاہئیں۔',
],
'starts_with' => ':attribute کا آغاز ان میں سے کسی ایک سے ہونا چاہیے: :values۔',
'string' => ':attribute لازمی طور پر ایک درست متن ہونا چاہیے۔',
'timezone' => ':attribute لازمی طور پر درست ٹائم زون ہونا چاہیے۔',
'unique' => ':attribute پہلے ہی لیا جا چکا ہے۔',
'uploaded' => ':attribute اپلوڈ کرنے میں ناکام۔',
'url' => ':attribute فارمیٹ درست نہیں ہے۔',
'uuid' => ':attribute لازمی طور پر درست UUID ہونا چاہیے۔',
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
'attributes' => [],
'invalid_json' => 'غلط ان پٹ۔ براہ کرم درست کریں اور دوبارہ کوشش کریں۔',
'invalid_captcha' => 'غلط کپچا۔ براہ کرم کپچا ٹائپ کریں اور دوبارہ کوشش کریں۔',
'complete_captcha' => 'براہ کرم کپچا پر کام کریں۔',
];