ModuLabry Logo

Umbraco-Suite by ModuLabry

NuGet

ML Password

The ML Password is a robust, security-focused property editor for the Umbraco Backoffice. It provides developers and editors with a highly configurable interface to enforce password policies while ensuring a seamless user experience through real-time feedback.

⚙️ Configuration

Tailor the password requirements in the Umbraco Data Type settings to match your security standards:

  • Show Eye Button: Toggles a visibility icon to let users reveal or hide the password.
  • Show Copy Button: Adds a button to quickly copy the password to the clipboard (useful for auto-generated credentials).
  • Suggest Password: Enables browser autocomplete hints for "new-password" suggestions.
  • Min/Max Length: Enforces a specific character count range.
  • Character Requirements: Define minimum counts for:
    • Numbers (0-9)
    • Uppercase Letters (A-Z)
    • Lowercase Letters (a-z)
    • Special Characters (configurable set like !@#$%^&*()-_=+[]{}|;:,.<>?)

💻 C# Data Retrieval (Value Converter)

The password is stored as a plain string. Depending on your use case (e.g., storing a third-party API key or a user password), you can retrieve it directly:

var content = Umbraco.Content("your-node-guid");
string plainPassword = content?.Value<string>("myPasswordProperty");

if (!string.IsNullOrEmpty(plainPassword)) 
{
    // Best Practice: If this is a user password, ensure it gets hashed 
    // before being stored in a custom database table.
}

✅ Validation

The editor provides a sophisticated validation system:

  • Interactive Rule Checklist: As the user types, a dynamic list of requirements (Rules-Box) updates in real-time. Fulfilled rules are marked green, while missing ones stay neutral until the user attempts to save.
  • Deep Validation: Prevents Umbraco from saving or publishing if any configured security rule is violated.
  • Smart UI State: If a save attempt fails, the editor automatically highlights the input with a red border and expands the rules checklist to point out exactly what is missing.

✨ Features

  • Modern UI Components: Uses lightweight, outlined SVG icons that blend perfectly with the Umbraco Backoffice design language.
  • Security First: Designed to prevent accidental submission of weak passwords.
  • Configurable Special Characters: Developers can define exactly which symbols are allowed or required, preventing issues with external systems that might not support certain characters.