单行文本验证 [英] SIngle line Text validation

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

问题描述

大家好,


是否可以限制&验证在单行文本列中输入的详细信息。我们在Sharepoint中有一个字段,从过去1年开始使用,此处数据由约200名团队成员提供,数据格式始终为格式,即"1-A2B3C4D5E",
此处数据包括前9个字符前2个字符是"1-"字符。和休息7是字母数字的组合。 


我们经常遇到有人在数据Feed中添加前缀和后缀导致问题的情况。有关如何验证或控制数据Feed错误的任何建议?我尝试过几次将字符限制为9,这导致最后一位数字为
,当空格有前缀时错过了。 


请告知。 


问候 - Gaurav Anvekar 

解决方案



在这种情况下,您可以使用正则表达式验证。


参见此文


https://archive.codeplex.com/?p=spregexfield


或者


您可以使用 presave 方法执行验证并允许用户保存表单。



Hi All,

Is it posisble to restrict & validate the details entered in Single Line of Text column. We have a field in Sharepoint which is being used from last 1 year, here data is wntered by ~200 team members and format of the data is always be in format i.e."1-A2B3C4D5E", here data consist of 9 characters first 2 characters are "1-" and rest 7 are combinations of Alpha numeric. 

We often come across situations where someone Prefixes and Suffixes additional space in the data feed causing issues. Any Advise on how do we validate or control data feed error? I tried few restricing the characters to 9, this caused the last digit to be missed out when space is prefixed. 

Please advise. 

Regards - Gaurav Anvekar 

解决方案

Hi,

you can use regular expression validation in this case.

see this article

https://archive.codeplex.com/?p=spregexfield

OR

you can use presave method to perform the validation and allow user to save the form.


这篇关于单行文本验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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