Remove any extra spaces
howdu opened this issue · 0 comments
howdu commented
I use Cleave for UI space formatting so needed a way of removing this.
const cleaveNumeral = new Cleave(elm {
numericOnly: true,
delimiters: [' '],
blocks: [3, 3],
});
Is there any other way than this?
if ($request->has(config('google2fa.otp_input'))) {
$request->merge([
config('google2fa.otp_input') => str_replace(' ', '', $request->get(config('google2fa.otp_input'))),
]);
}