I think its best to use static variable for '254'. 
Also, I'm guessing this is the limit of the database field, which is something that we didn't enforce in the HLocale entity. Perhaps we can enforce now to match with this validation.