Related to blackberry application development - validation

I have an edit field and I want to use it for numeric value.
Can anyone tell me how to enter only numeric value in edit field, I want to use it for phone number. I used BasicEditField.numeric but didn't work.
I also want to validate it in proper format....ddd-ddd-dddd.

Have you tried the BasicEditField with FILTER_PHONE? Example can be found here.
I've never seen anything you could use for validation you need in the BB API. RegExps are not supported in BB API, so you'll most likely have to write your own validator.

Related

Vuetify Input Mask

Has anyone found an Input Mask library that works with Vuetify using a directive? I have tried Cleave.js, vue-mask, imask, and a few other and they all seem to fall short or are buggy. Any suggestions would be appreciated.
is there a specific thing that you are trying to achieve, the mask that they have by default you can use to mask text fields already they have some pre-made and you can customize to your needs. I'm just curious as what you are trying to achieve.
Thanks for your response. I have looked at the provided masks but they dont work for my needs. For instance, I want to have an input field that only accepts numbers but isnt limited to the amount of numbers. If I put mask="####" as the attribute it will only allow numbers but only 4 digits. If I want to allow unlimited numbers how would I accomplish that? Thanks for your help

Magnolia field check validation

I want to add the following functionality within a page's dialog.
Suppose you have text field A and text field B (to the dialog's yaml file).
I want to make field B available for the author (input) only when text field A has content.
I know it is a straightforward problem but i am relatively new to magnolia.Any help is appreciated
Thanks in advance
Unfortunately fields are completely atomic and independent so there's no way of fields reacting to each other without rewriting DialogPresenter to make them aware of each other.
You can see example of how this can be done e.g. in magnolia-external-form module if you use enterprise version of Magnolia. Code for it is in Magnolia's git repo.
HTH,
Jan

Is there any way to clear out the "Testers" field in Microsoft Test Manager (or in TFS)

Seems like once you set the Testers field on a Test Case in MTM, it will not allow you to clear it. You are only allowed to change it to a different value. Has anyone found a way to clear this field?
It is important to not get the "Assigned" Tester field confused with the Assigned To field. They are distinct fields on a Test Case work item. One reason why someone might want the Tester field to be blank is if a team all pitches in to help with testing during an iteration and leaving the assigned tester blank allows the team to know that no one has "picked up" this test to execute. The team member could then assign the test to his or herself and execute it.
The template pulls the Assigned Tester Values from a list using the 'AllowedValues' tag. Instead, simply change this to 'SuggestedValues'. That will allow for empty values - easy as that.
If you'd rather not allow free entry, you can also add a default value such as 'None' and use that rather than blank.
Unless you've customized your work item type, this field should never be blank after being saved. It defaults to the person who created the bug in all Microsoft supported process templates, and a value is required by default.
That being said, why would you want to change it to blank?
If you really, really want to be able to blank it out (which I don't think is a good idea at all), you'll need to customize your template. See the below guidance:
http://msdn.microsoft.com/en-us/library/ms243849(v=vs.110).aspx

Changing CodeIgniter url_title from Czech characters to standard English characters

What's the best way to save CodeIgniter url_title's originally written using Czech characters as standard English characters? For example:
Currently this:
/projects/Hledám-sponzora-na-nákup-příslušenství-k-invalidní1/123
I'd prefer this:
/projects/hledam-sponzora-na-nakup-prislusenstvi-k-invalidni1/123
I tried changing just the url_title table collation to non-Czech, but it caused an error when submitting the form. Any ideas?
Just in case anybody needs it (a year later), try with convert_accented_characters() of the Text Helper. This is how I do it:
url_title(convert_accented_characters($title_with_accents), 'dash', TRUE)
Works quite well :)
You can also check the file application/config/foreign_chars.php and edit it if it's needed.
I don't understand what you are trying to do... Are these urls? If so, I'd choose numbers that associate to the titles you want to use.
Could you show the markup of the form? Also the controller function that handles the submission could be major help... Help us help you!

howto get Builder to create <tag></tag> instead of <tag/>

I,m using Builder::XmlMarkup to create xml. I want to create a tag without content because the api force me to create this.
If I use a blog
xml.tag do
end
I get what i need
<tag></tag>
but I want it shorter
xml.mytag
this gives me
<mytag/>
but i want
<mytag></mytag>
what do I have to pass as option.
regards Kai
Just pass empty string as a parameter. xml.mytag('')
Why do you want <mytag></mytag> instead of <mytag/>? Since the output is XML, downstream applications should not know or care about the difference.
According to the Infoset spec (Appendix D point 7), "The difference between the two forms of an empty element: <foo/> and <foo></foo>" is not represented in the XML Information Set.
This doesn't answer your "how" question, but if you discover that you actually don't need to do what you're trying to do, it may save you from a difficult and unnecessary wild goose chase.
ok empty string is nice, another one-line-way is empty block I found out.
xml.mytag{}

Resources