I want to remove the case sensitivity from emails when searching emails.
For further explanation, If I search an email(dmc@gmail.com) in a different ways like this 'DMC@gmail.com' or 'dMc@gmail.com' or 'Dmc@gmail.com'. I want to retrieve the email. If anyone can help, really appreciated.
Thank you
>Solution :
In order to achieve that you could get the text value from the search input and transform it to lowercase before executing the search, you can do that in JS with the method [yourText].toLowerCase()
Example:
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript String to lowercase</h1>
<input id="your-input" type="text">
<button onclick="convertText()">To lowercase!</button>
<p id="demo"></p>
<script>
function convertText() {
let text = document.getElementById("your-input").value;
document.getElementById("demo").innerHTML = text.toLowerCase();
}
</script>
</body>
</html>