Skip to content

toLowerCase ​

把字符串转换为小写。结果写入 data。

签名 ​

ts
function toLowerCase(): Action<string>

示例 ​

邮箱和用户名 ​

ts
const Login = object({
  email: pipe(string(), trim(), toLowerCase(), email()),
  username: pipe(string(), toLowerCase()),
});

另请参阅 ​