Reputation: 1865
I'm currently using sweetalert2 to have the user select a file. If the user does not select a file I am using inputValidator to post an error message on the popup. The default error message puts a red border around the file input box. Is it possible to remove the red border or to customize it (change it to green/blue)? Here is the code I am using.
const MySwal = withReactContent(Swal)
MySwal.fire({
confirmButtonText: 'Submit File',
showCancelButton: true,
title: "<b>Submit New File</b>",
input: 'file',
focusConfirm: false,
allowOutsideClick: false,
inputValidator: (value) => {
if(!value){
return "Please select a file"
}
}
Thanks!
Upvotes: 1
Views: 580