开发中需要对输入的“年-月”进行验证,使用TcxMaskEdit控件加上正则表达式轻松完成该功能,具体正则表达式如下:
([123][0-9])? [0-9][0-9]-(0?[1-9] | 1[012])
只需将该表达式填入:TcxMaskEditt->Properties->EditMask的属性即可;
Powered by: 博客园 Copyright © 2024 Murphy(土豆) Powered by .NET 8.0 on Kubernetes