ubc / profile-cct

Profile Custom Content Type
5 stars 4 forks source link

Canned "Courses taught" field doesn't allow alpha chars in Course # box #2

Open adrianbartel opened 10 years ago

adrianbartel commented 10 years ago

Unless copied and pasted in. profiles-cct

loongchan commented 10 years ago

Hi Adrian, How many letters are there and what is the normal expected pattern? Is it letters only at the end? Is it ever more than one letter? are there any other possible patterns? This will help make it much easier to implement the fix.

Thanks! Loong

adrianbartel commented 10 years ago

Looking at a course listing such as this page https://courses.students.ubc.ca/cs/main?pname=subjarea&tname=subjareas&req=1&dept=EDCP suggests the course number can either be three digits or three digitals plus a letter. I wouldn’t rule out other patterns. The main thing I’ve seen is ddd[l]

From: loongchan [mailto:notifications@github.com] Sent: November-21-13 2:49 PM To: ubc/profile-cct Cc: Bartel, Adrian Subject: Re: [profile-cct] Canned "Courses taught" field doesn't allow alpha chars in Course # box (#2)

Hi Adrian, How many letters are there and what is the normal expected pattern? Is it letters only at the end? Is it ever more than one letter? are there any other possible patterns? This will help make it much easier to implement the fix.

Thanks! Loong

— Reply to this email directly or view it on GitHubhttps://github.com/ubc/profile-cct/issues/2#issuecomment-29032628.

loongchan commented 10 years ago

Hi Adrian, Thanks for that info! I had a look at the code and it shows that the reason that cut/paste works but not typing is because on each keypress, the field checks for valid inputs in a character by character basis using regular expressions. To resolve this issue, we can make it take only numbers and letters(upper and lower). Do you think that would be good?

adrianbartel commented 10 years ago

Sounds perfect.

From: loongchan [mailto:notifications@github.com] Sent: November-21-13 4:15 PM To: ubc/profile-cct Cc: Bartel, Adrian Subject: Re: [profile-cct] Canned "Courses taught" field doesn't allow alpha chars in Course # box (#2)

Hi Adrian, Thanks for that info! I had a look at the code and it shows that the reason that cut/paste works but not typing is because on each keypress, the field checks for valid inputs in a character by character basis using regular expressions. To resolve this issue, we can make it take only numbers and letters(upper and lower). Do you think that would be good?

— Reply to this email directly or view it on GitHubhttps://github.com/ubc/profile-cct/issues/2#issuecomment-29038090.