maskedtextbox输入无效 [英] maskedtextbox isvalid input

查看:97
本文介绍了maskedtextbox输入无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何验证maskedtextbox中输入的文本是否有效并且与掩码兼容吗? (不使用正则表达式)

谢谢.

Hi, Does anyone know how to validate if the entered text in the maskedtextbox is valid and compatible to the mask? (without using regex)

Thanks.

推荐答案

嗯... MaskTextBox中的输入始终有效,所以您不必验证它.
如果无效,则表示尚未正确配置MaskTextBox.这是您的错误,而不是用户的错误.
Well... The input in the MaskTextBox is always valid, so you should never have to validate it.
If it is not valid, this means you have not configured the MaskTextBox properly. It is your fault, not the user''s.


这篇关于maskedtextbox输入无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆