mCaptcha/templates/utils/isBlankString.js
2021-04-09 14:21:43 +05:30

8 lines
195 B
JavaScript

const isBlankString = (event, value, field) => {
if (!value.replace(/\s/g, '').length) {
event.preventDefault();
alert(`${field} can't be empty`);
}
};
export default isBlankString;