Closed Th3C0d3Mast3r closed 2 months ago
Candidate name is also case-sensitive
Actually what will happen is when we enter details from frontend we will use a javascript function called toUpperCase() which will convert "bjp" or "Bjp" or 'bJp" all to "BJP" which if being added 2nd time will get rejected. Candidate name can happen twice that's fine.
const sentence = 'The quick brown fox jumps over the lazy dog.';
console.log(sentence.toUpperCase());
// Expected output: "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
Also, again for DOB and Aadhar number it will be verified on front end through Aadhar API on google. Once verified using that only then we can process the vote in solidity.
ooh i thought u would do that on backend only fine that was also
Cool. Committed some fixes. Be sure to pull them to ur local machines
The party thing is CASE-SENSITIVE;
so, if I put- CANDIDATE NAME: DEVESH CANDIDATE PARTY: BJP and then,
CANDIDATE NAME: AARYAN CANDIDATE PARTY: bjp. . . . . . . . . . both of them are taken in-thus, we need to compare the party name and the candidate name without the case sensitivity.
PROBLEM WITH DOB
there is no proper check on the DOB-thus, we need to restrict that so as to match the proper months, proper days of that month as per the Gregorian calendar.