mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Set error messgaes for form fields
This commit is contained in:
parent
e470fb60a2
commit
faf20030e3
2 changed files with 68 additions and 26 deletions
|
|
@ -34,7 +34,7 @@ class APIResponse {
|
|||
dynamic data;
|
||||
|
||||
// Request is "valid" if a statusCode was returned
|
||||
bool isValid() => statusCode >= 0;
|
||||
bool isValid() => (statusCode >= 0) && (statusCode < 500);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ class InvenTreeAPI {
|
|||
|
||||
|
||||
// Perform a PATCH request
|
||||
Future<APIResponse> patch(String url, {Map<String, String> body = const {}, int expectedStatusCode=200}) async {
|
||||
Future<APIResponse> patch(String url, {Map<String, String> body = const {}, int? expectedStatusCode}) async {
|
||||
var _body = Map<String, String>();
|
||||
|
||||
// Copy across provided data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue