diff --git a/lib/Logitar.Identity.Core/Locale.cs b/lib/Logitar.Identity.Core/Locale.cs
index f43af5d..e312d51 100644
--- a/lib/Logitar.Identity.Core/Locale.cs
+++ b/lib/Logitar.Identity.Core/Locale.cs
@@ -40,10 +40,10 @@ public Locale(CultureInfo culture)
/// The multipart code of the locale.
public Locale(string code)
{
- Code = code;
+ Code = code.Trim();
new Validator().ValidateAndThrow(this);
- Culture = CultureInfo.GetCultureInfo(code);
+ Culture = CultureInfo.GetCultureInfo(Code);
}
///