mCaptcha/templates/utils/isBlankString.js

9 lines
195 B
JavaScript
Raw Normal View History

2021-04-09 11:51:43 +03:00
const isBlankString = (event, value, field) => {
if (!value.replace(/\s/g, '').length) {
event.preventDefault();
alert(`${field} can't be empty`);
}
};
export default isBlankString;