mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-03 01:23:22 +02:00
Fixed #205
This commit is contained in:
parent
032d89a9a6
commit
325c0fb235
3 changed files with 9 additions and 2 deletions
|
@ -409,6 +409,9 @@ class SystemController extends Controller
|
|||
case 'korean':
|
||||
$idntable = '/^[가-힣0-9]+$/u';
|
||||
break;
|
||||
case 'arabic':
|
||||
$idntable = '/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(?<!-)$/u';
|
||||
break;
|
||||
default:
|
||||
$idntable = '/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i';
|
||||
break;
|
||||
|
@ -983,6 +986,7 @@ class SystemController extends Controller
|
|||
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ]+$/u' => 'Cyrillic',
|
||||
'/^[ぁ-んァ-ン一-龯々]+$/u' => 'Japanese',
|
||||
'/^[가-힣]+$/u' => 'Korean',
|
||||
'/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(?<!-)$/u' => 'Arabic',
|
||||
];
|
||||
|
||||
$idnRegex = $tld['idn_table'];
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<option value="cyrillic">{{ __('Cyrillic') }}</option>
|
||||
<option value="japanese">{{ __('Japanese') }}</option>
|
||||
<option value="korean">{{ __('Korean') }}</option>
|
||||
<option value="arabic">{{ __('Arabic') }}</option>
|
||||
</select>
|
||||
<small class="form-text text-muted">{{ __('Choose the script type that the TLD will support. Options include ASCII, Cyrillic, Japanese, and Korean.') }}</small>
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ0-9ʼѫѣѭ]+$/u': 'Cyrillic',
|
||||
'/^[ぁ-んァ-ン一-龯々0-9]+$/u': 'Japanese',
|
||||
'/^[가-힣0-9]+$/u': 'Korean',
|
||||
'/^(?!-)(?!.*--)[\u0621-\u064A\u0660-\u0669\u0671-\u06D3-]{1,63}(?<!-)$/u': 'Arabic'
|
||||
};
|
||||
|
||||
const scriptNameToBadgeClass = {
|
||||
|
@ -40,6 +41,7 @@
|
|||
'Cyrillic': 'bg-secondary-lt', // Grey badge for Cyrillic
|
||||
'Japanese': 'bg-success-lt', // Green badge for Japanese
|
||||
'Korean': 'bg-danger-lt', // Red badge for Korean
|
||||
'Arabic': 'bg-teal-lt', // Teal badge for Japanese
|
||||
// Add more mappings as needed
|
||||
'Unknown': 'bg-warning-lt' // Yellow badge for Unknown
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue