I am trying to create a address form for south korean people. I don't know korean language. So, Can someone provide me example address forms. Also, are there any trick to validate this form? (required, lenght, special regex etc.)
Thank you so much!
Old thread but here it is:
You will need Street Number, Street Address, Province, City, Zip Code.
The order goes like this:
City, Province, Street Name, Street Number, and apartment # if any, then Zip Code.
Related
has LUIS a solution for German composite words like "SALAMIPIZZA" (engl: salami pizza)?
German instance separates words without any logical rule. "Apfelsaft" (engl.: apple juice) as example is not separated, but salami pizza it's.
You can use a list entity to account for this. For example, create list entity named "Foods", then a create a canonical form called "SALAMIPIZZA", and for that canonical form's list, enter in "SALAMIPIZZA" and "SALAMI PIZZA". This would also allow you to account for other spellings, such as "SALAMI-PIZZA".
I've been playing around with androids NFC capabilities and scanning the data off of my credit cards
The card holder name I get from the card is in the form
Smith/John
Whereas the name on my physical card is like so
John Smith
Does anyone know if it's possible to grab the card holder name that's on the card? The one that's used to make online payments. Can the name with the slash be used in that form as well?
Both, the name that you read from the card and the name that's printed on the card are infact the same. The printed name is typically printed {FIRST NAME}{SPACE}{LAST NAME} whereas the card holder name field in the card's data structures (e.g. mag-stripe track data) is always encoded as {LAST NAME}/{FIRST NAME}. So to get the name printed on the card you can simply split the string at the "/" (slash) to get the first name and last name fields. You can then re-arrange those fields in whatever form you need.
Btw. note that all major brands committed to removing the name information from the data structures readable through the contactless interface. Thus, with future cards, reading the card holder's name through NFC will not be possible any more.
I am new to scala . I want to validate address module which contains the following sub-fields and their validation requirement:
office no:must contain alphanumeric value (e.g. D-20),
Floor no:Must contain only digits less than 150,
Building name :Can contain alphanumeric value.,
Area:Must have alphabets(e.g. Mumbai),
Country :Must have only alphabets,
zip code: Must have 6 digit value.
It will be very helpful for me if someone suggest me any link to read for these kind of validations.
Thank u in advance. .
If you only need to validate very simple things, you should take a look at using regex to solve your problem. For more complicated languages, scala has a library called parser combinators, but it is almost certainly overkill for your problem.
I want each user to register with a unique email address. However some email addresses like GMail allow you to add a + suffix which could be used to register multiple accounts to a website but it all goes to a single email address e.g.
bob#gmail.com goes to bob#gmail.com
bob+1#gmail.com goes to bob#gmail.com
bob+2#gmail.com goes to bob#gmail.com
bob+3#gmail.com goes to bob#gmail.com
bob+4#gmail.com goes to bob#gmail.com
Effectively they can have as many email addresses as they want. This is a problem because my website sees it as 5 separate email addresses but gmail sees it as one email address.
I was thinking of blocking any email addresses with a ‘+' in, but I don’t want to block any valid email addresses. What is the standard practice?
I don't think there is a standard practice on how to handle this, other than not allowing + all together. On the other hand, preventing it doesn't seem to be that useful. It won't take more than a few minutes to create an entirely new e-mail address on some free service if whoever you're intending to block-out really needs it.
It should also be noted that a lot of other e-mail providers also provide subaddressing, but not using the plus sign, but with a hyphen (Yahoo, Runbox, etc.), and attempting to block this out will only cause trouble for anybody just having an e-mail address with a hyphen in it. It's a war that you've already lost.
Besides, if you filter out plus signs, you're essentially not compliant with the RFC3696 standard anymore:
The exact rule is that any ASCII character, including control
characters, may appear quoted, or in a quoted string. [...]
Without quotes, local-parts may consist of any combination of
alphabetic characters, digits, or any of the special characters
! # $ % & ' * + - / = ? ^ _ ` . { | } ~
But you could just strip out the plus part if you insist.
$emails = array('bob#gmail.com','bob+1#gmail.com','bob+hello#gmail.com');
foreach ($emails as &$email)
{
list($identifier, $domain) = explode('#',$email);
list($name) = explode('+',$identifier);
$email = $name."#".$domain;
}
print_r($emails);
The above will give you
Array
(
[0] => bob#gmail.com
[1] => bob#gmail.com
[2] => bob#gmail.com
)
Email ids can contain many characters which would look incorrect to us, I found a good thread here which might answer your query: What characters are allowed in an email address?
Also to find the unique email id, just take the first half of the email id and remove + and . chars and then verify.
Can the Card Name (i.e. the cardholder name, not the card type) contain non-ASCII characters?
Example: "JOSÉ GONZÁLEZ".
The character set that is used does not allow for diacritics. In brief, it only allows uppercase ASCII characters.
The restriction ultimately comes from the historical way in which banking cards encode data onto the magnetic stripe (as defined in ISO 7811). The data is encoded in a 7 bits per character format known as ITU-T.50
The cardholder name is encoded with up to 26 characters, each within the range from hex 20-5F. You can see the table for this here: http://www.zytrax.com/tech/ia5.html
Magnetic stripe can store even punctuation symbols like ! " * # % & ( ) ^ : ; < > = ? [ / ] _
But in practice cardholders names uses only:
Range of English uppercase letters
Apostrophe (') for names like "Gareth O'Hare"
Minus (-) for double names like "Alexandru-Cristian"
Dot (.) for honorific prefixes like "MR.", "MRS.", "MISS.", "MS.", "DR.", "THE."
Dot (.) for initials like "Jimmy L. Morgan", "J.P. Teron"
Indeed, only ASCII characters are allowed. But other manipulation is allowed. One can print the name on the first or the second line. One can choose with or without dots and so on.
So, you can't make the customer happy with diacrits (thinks Norwegian and German names). But you can the customer let choose between full firstname of only one character (e.g. JOSE GONZALES or J. GONZALES). It helps to make the customer happy.
Chip cards (aka smart Cards, EMV cards) contain and can return a plethora of different values including "Cardholder Name" (tag 5F20) and "Cardholder Name Extended" (tag 9F0B). EMV Co. says that both of these tags should follow ISO 7813 but I've already seen one card (an "NH Card" from Korea Air) in which tag 5F20 contained lowercase characters. Pandora's box has been opened!
The credit card processors I've used in the past only allowed ASCII in the cardholder name, but you should check with your credit card processor to see what their requirements/restrictions are.