menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class OtpInputType - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class OtpInputType

    Defines the input type options for the SfOtpInput component, determining what characters are accepted.

    Inheritance
    System.Object
    OtpInputType
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class OtpInputType : Enum
    Remarks

    This enumeration controls the input validation and character filtering behavior of the OTP component. Different input types provide different user experiences and security characteristics.

    Fields

    Number

    Accepts only numeric characters (0-9) and automatically filters out non-numeric input.

    Declaration
    public const OtpInputType Number
    Field Value
    Type
    OtpInputType
    Remarks

    This is the most common type for OTP inputs as most OTP systems use numeric codes. Non-numeric characters typed by the user will be automatically rejected.

    Password

    Accepts all characters but displays them as masked dots or asterisks for security.

    Declaration
    public const OtpInputType Password
    Field Value
    Type
    OtpInputType
    Remarks

    This type provides enhanced security by hiding the entered characters from view, making it suitable for sensitive OTP scenarios where shoulder-surfing protection is needed.

    Text

    Accepts all alphanumeric characters and symbols, providing the most flexibility.

    Declaration
    public const OtpInputType Text
    Field Value
    Type
    OtpInputType
    Remarks

    This type is suitable for OTP systems that use mixed character sets or when you need to support special characters in the verification code.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved