开发者

Spring file upload file content valdiation

开发者 https://www.devze.com 2023-03-01 22:10 出处:网络
I need to upload file using Spring. I am using the Spring fileupload functionality. File can have any number of lines of records must be of 25digit number (should not be lessthan or morethan). does sp

I need to upload file using Spring. I am using the Spring fileupload functionality. File can have any number of lines of records must be of 25digit number (should not be lessthan or morethan). does spring validator has option to validate this case or should we need to parse every 开发者_StackOverflow社区line and validate?


I don't think spring has built in validator for that case. Should be straight forward enough to write a regular expression-- \d{25} -- and see if each line in the file matches that pattern.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号