Validation in ASP.NET MVC is done by decorating model properties with attributes. There are some built-in validation attributes. For example, Required attribute ensures that there exists a value for the property. We can write custom validation attributes as well. In this post, we build a UrlValid
attribute. When the user enters an URL in a TextBox, the UrlValid
attribute verifies if the URL is active.…
Month: February 2014
I am learning Objective-C. This post contains some Objective-C trivia which I picked up over the last few weeks.
Concatenating Strings
In Objective-C, NSString
class represents strings. Concatenating two strings is not easy. To ease the pain, there is a NSMutableString
class. It has an append method. The StackOverflow post summarises the different methods available to concatenate strings. Usually, we have problems with XML strings which run into multiple lines.…