cjl
2024-03-28 33b9d2c203a9998272088ecdf43a15dd53669967
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.moral.pojo;
 
import lombok.Data;
import org.springframework.util.ObjectUtils;
 
/**
 * @ClassName VerificationCode
 * @Description 验证码类
 * @Author 陈凯裕
 * @Date 2021/3/17 8:51
 * @Version TODO
 **/
@Data
public class VerificationCode {
 
    private String key;
 
    private String encode;
 
    private String inputText;
 
    public boolean valid(){
        if (
                ObjectUtils.isEmpty(key)        ||
                ObjectUtils.isEmpty(inputText)  ||
                        inputText.length()!=4
                )
            return false;
        return true;
    }
}