1

OneSignal para Nuxt Player ID valido con Expresiones regulares en Js

Documentacion de OneSignal de PlayerId

const playerId = prompt('Ingrese playerId: ')
const pattern = /^[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}$/

constisValid = pattern.test(playerId)

console.log(`El player ID ingresado ${isValid? '"es valido"' : '"no es valido"'}`)

Escribe tu comentario
+ 2