Class OtpInputType
Defines the input type options for the SfOtpInput component, determining what characters are accepted.
Inheritance
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.