Closed N0tExisting closed 3 days ago
Great idea! I plan to add this in our next release. Until then, you can use transform
:
import * form 'valibot';
const Schema = v.pipe(
v.string(),
v.transform((input) => input.normalize('NFC'))
);
v0.36.0 is available
It would be nice if there was built-in support for
String.prototype.normalize
as a built in transformer.This would be usefull to avoid wierd issues with strings:
For options and more detail see the MDN documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize