SaudiPlate 0.1.0

dotnet add package SaudiPlate --version 0.1.0
                    
NuGet\Install-Package SaudiPlate -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SaudiPlate" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SaudiPlate" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SaudiPlate" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SaudiPlate --version 0.1.0
                    
#r "nuget: SaudiPlate, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SaudiPlate@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SaudiPlate&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SaudiPlate&version=0.1.0
                    
Install as a Cake Tool

SaudiPlate

A production-ready .NET library for Saudi vehicle plate parsing, normalization, validation, formatting, and equality comparison.


Features

  • Parse raw user input from Arabic, Latin, or mixed script input
  • Normalize Arabic-Indic digits to ASCII for storage
  • Validate Saudi plate structure with strict and standard modes
  • Format plates for canonical storage, English display, and Arabic display
  • Compare plate inputs by canonical identity
  • Zero external dependencies

Saudi Letter Mapping

This library uses the official Saudi plate mapping (not general Arabic transliteration).

Arabic Latin Code
ا A ALIF
ب B BA
ح J HA
د D DAL
ر R RA
س S SIN
ص X SAD
ط T TA
ع E AIN
ق G QAF
ك K KAF
ل L LAM
م Z MIM
ن N NUN
ه H HAH
و U WAW
ي V YA

Installation

dotnet add package SaudiPlate

Quick Start

using SaudiPlate;

var result = SaudiPlateApi.NormalizePlate("١٢٣٤ ا ب ح");

Console.WriteLine(result.Success);     // true
Console.WriteLine(result.Canonical);  // ABJ-1234

Console.WriteLine(
    SaudiPlateApi.FormatPlate("ABJ1234", FormatStyle.DisplayAr)
);

var validation = SaudiPlateApi.ValidatePlate("1234 ABJ");
Console.WriteLine(validation.IsValid);

API

NormalizePlate

var result = SaudiPlateApi.NormalizePlate(input, options);

Returns:

  • Success
  • Canonical
  • Plate
  • Warnings
  • Errors

ValidatePlate

var result = SaudiPlateApi.ValidatePlate(input, options);

Returns:

  • IsValid
  • Plate
  • Issues

FormatPlate

SaudiPlateApi.FormatPlate(inputOrPlate, FormatStyle.DisplayAr);

Supported styles:

  • Canonical
  • DisplayEn
  • DisplayAr

EqualsPlate

SaudiPlateApi.EqualsPlate(a, b, options);

Compares two inputs by canonical identity.


Strictness Modes

Strict

  • No mixed Arabic and Latin letters
  • No digits-before-letters input
  • Exactly 4 digits required
  • No folded Arabic characters (أ، إ، آ، ة، ى، ئ...)

Standard

  • Mixed scripts allowed
  • Reordered input allowed with warnings
  • 1 to 4 digits allowed
  • Folded Arabic characters normalized

Test Matrix

The following matrix summarizes the full test coverage (37/37 passing):

Valid Inputs

Input Mode Result Canonical
ABJ1234 Standard ✔️ ABJ-1234
ABJ1234 Strict ✔️ ABJ-1234
ABJ-1234 Standard ✔️ ABJ-1234
ا ب ح ١٢٣٤ Standard ✔️ ABJ-1234
ا ب ح ١٢٣٤ Strict ✔️ ABJ-1234

Normalization Cases

Input Standard Strict Notes
1234 ABJ ✔️ ABJ-1234 REORDERED_INPUT
ABJ__1234 ✔️ ABJ-1234 ✔️ Cleans punctuation
AبJ1234 ✔️ ABJ-1234 Mixed scripts rejected in strict

Invalid Inputs

Input Mode Error
ABC 1234 Both UNSUPPORTED_CHARACTERS
ABJ 12345 Both INVALID_DIGIT_COUNT

Strict Mode Rejections

Input Standard Strict Reason
ABJ 123 ✔️ ABJ-123 SHORT_DIGITS_NOT_ALLOWED
أ ب ح ١٢٣٤ ✔️ ABJ-1234 Folded Arabic
إ ب ح ١٢٣٤ ✔️ ABJ-1234 Folded Arabic
آ ب ح ١٢٣٤ ✔️ ABJ-1234 Folded Arabic
ا ب ة ١٢٣٤ ✔️ ABH-1234 Folded Arabic
ا ب ى ١٢٣٤ ✔️ ABV-1234 Folded Arabic
ا ب ئ ١٢٣٤ ✔️ ABV-1234 Folded Arabic

Arabic Mapping Examples

Input Canonical Display (Arabic)
ح J ح
ه / ة H ه
ي / ى / ئ V ي

Equality Behavior

A B Equal
ABJ1234 ا ب ح ١٢٣٤ ✔️

Notes

  • Canonical format: LETTERS-DIGITS (e.g. ABJ-1234)
  • Designed for validation, normalization, and formatting
  • Not intended for OCR or vehicle registry lookup
  • Fully deterministic and locale-independent

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 136 4/22/2026