我想在 codeigniter 中设置我的验证规则,例如以字符“P”或“S”开头的字段,否则它是无效的。如何使用 Codigniter 验证库来做到这一点?
Test Case 1: input: A145874 ------- invalid Must start with P or S
Test Case 2: input: P258741 ------- valid
Test Case 3: input: P45KK91 ------- invalid Must not contain Letters in other positions rather the first one.
Test Case 4: input: S457821 ------- valid