Better regexp for validation of aspect_ratio.
parse function for aspect ratio (in JS).