Open vlukashov opened 5 years ago
validator()
const isAvailableName = async (value) => { const response = await fetch(`/validate/name/${encodeURIComponent(value)}`); const result = await response.json(); if (result.error) { return `Please pick another name. '${value}' is not available.`; } };
validator()
functions can by asynchronous.