Title: Add Decimal validator · Issue #109 · formencode/formencode · GitHub
Open Graph Title: Add Decimal validator · Issue #109 · formencode/formencode
X Title: Add Decimal validator · Issue #109 · formencode/formencode
Description: Needs some work on docstring basically: class Decimal(RangeValidator): """Convert a value to an integer. Example:: >>> Decimal.to_python('10') 10 >>> Decimal.to_python('ten') Traceback (most recent call last): ... Invalid: Please enter a...
Open Graph Description: Needs some work on docstring basically: class Decimal(RangeValidator): """Convert a value to an integer. Example:: >>> Decimal.to_python('10') 10 >>> Decimal.to_python('ten') Traceback (most recent...
X Description: Needs some work on docstring basically: class Decimal(RangeValidator): """Convert a value to an integer. Example:: >>> Decimal.to_python('10') 10 >>> Decima...
Opengraph URL: https://github.com/formencode/formencode/issues/109
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add Decimal validator","articleBody":"Needs some work on docstring basically:\n\n``` py\nclass Decimal(RangeValidator):\n \"\"\"Convert a value to an integer.\n Example::\n >>> Decimal.to_python('10')\n 10\n >>> Decimal.to_python('ten')\n Traceback (most recent call last):\n ...\n Invalid: Please enter an integer value\n >>> Int(min=5).to_python('6')\n 6\n >>> Int(max=10).to_python('11')\n Traceback (most recent call last):\n ...\n Invalid: Please enter a number that is 10 or smaller\n \"\"\"\n\n messages = dict(\n decimal=_('Please enter a decimal value'))\n\n def _convert_to_python(self, value, state):\n try:\n return decimal.Decimal(value)\n except (ValueError, TypeError):\n raise Invalid(self.message('decimal', state), value, state)\n\n _convert_from_python = _convert_to_python\n```\n","author":{"url":"https://github.com/lambacck","@type":"Person","name":"lambacck"},"datePublished":"2016-04-04T23:38:46Z","url":"https://github.com/formencode/formencode/issues/109"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1304194f-4955-866b-3e3f-1ff06ba16ba0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7A0:3F3939:1460A0D:1CB478C:6B045DBF |
| html-safe-nonce | d4e71a7940cc9708b47be55c43b5ca02b17b28bcdaf97554030117725d58baeb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0EwOjNGMzkzOToxNDYwQTBEOjFDQjQ3OEM6NkIwNDVEQkYiLCJ2aXNpdG9yX2lkIjoiMjMwOTI3MjEwNDMwODMzNDAxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7ffff8d6a4e6449762b897b6d478f0a5e47649f79dbfb90c11b2e2f767b9179d |
| hovercard-subject-tag | issue:145834166 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/formencode/formencode/109/issue_layout |
| twitter:image | https://opengraph.githubassets.com/555945230818732ce3bbedba6351d85b86c68d45e7ae9070c102609cf65e3971/formencode/formencode/issues/109 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/555945230818732ce3bbedba6351d85b86c68d45e7ae9070c102609cf65e3971/formencode/formencode/issues/109 |
| og:image:alt | Needs some work on docstring basically: class Decimal(RangeValidator): """Convert a value to an integer. Example:: >>> Decimal.to_python('10') 10 >>> Decimal.to_python('ten') Traceback (most recent... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lambacck |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/formencode/formencode git https://github.com/formencode/formencode.git |
| octolytics-dimension-user_id | 1541742 |
| octolytics-dimension-user_login | formencode |
| octolytics-dimension-repository_id | 3733133 |
| octolytics-dimension-repository_nwo | formencode/formencode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3733133 |
| octolytics-dimension-repository_network_root_nwo | formencode/formencode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width